How do I have to set URL parameters, tryed everything.
What I have now is this. The URL Parameters must be Dynamic.
<?php $imtem_id= $row_Recordset1['ProduktID']; //Haalt ProduktID op uit recordset en stopt hem in $item_id
$imtem_name= $row_Recordset1['ProduktNaam']; //Haalt ProduktNaam op uit recordset en stopt hem in $item_name
<?php "<a href='http://localhost/test/bestellijst.php?' ... em_name</a>";?>
URL Parameters
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
You aren't echoing out the link you're creating and you seem to be mispelling some variable names, you've also not assigned a variable name to the $item_id value in the query string:
Hope it helps.
Mac
Code: Select all
<?php
//Haalt ProduktID op uit recordset en stopt hem in $item_id
$item_id= $row_Recordset1ї'ProduktID'];
//Haalt ProduktNaam op uit recordset en stopt hem in $item_name
$item_name= $row_Recordset1ї'ProduktNaam'];
echo '<a href="http://localhost/test/bestellijst.php?item_id='.$item_id.'">'.$item_name.'</a>';
?>Mac
Last edited by twigletmac on Fri Aug 30, 2002 2:55 am, edited 1 time in total.
Re: URL Parameters
Have a look at your single quotesSkywalker wrote:How do I have to set URL parameters, tryed everything.
What I have now is this. The URL Parameters must be Dynamic.
<?php $imtem_id= $row_Recordset1['ProduktID']; //Haalt ProduktID op uit recordset en stopt hem in $item_id
$imtem_name= $row_Recordset1['ProduktNaam']; //Haalt ProduktNaam op uit recordset en stopt hem in $item_name
<?php "<a href='http://localhost/test/bestellijst.php?' ... em_name</a>";?>
either this
<?php "<a href="http://localhost/test/bestellijst.php?= ... em_name</a>";?>
or
<?php "<a href='http://localhost/test/bestellijst.php?= ... em_name</a>";?>
but what are you setting to $item_id
<?php "<a href="http://localhost/test/bestellijst.php?[b]whatvariable[/b]=$item_id">$item_name</a>";?>
Then 'whatvariable' will be available within bestellijst.php as a variable and will contain the value that was in $item_id, it is passed as GET
$_GET['whatvariable'] or $whatvariable - dependent on your version of PHP and the status of the global variables setting in the php.ini