Forum Moderators: coopster
One of the links is #*$!.php which connects to the db and queries some info.
likewise for other links.
So basically I have a set of different select query statements which I would like to throw to the user as and when clicked upon that link.
And all the links must point to the same get variable from the form.
I have been trying all variations for 3 days now.
Help.
In xxx.php, the code besides selecting data from db also has a link to another .php file which selects a second set of data.
Can I use the following when defining a link?
<a href ="123.php?var=".$_GET['var']>Click here for more data from db</a>
The above does'nt work.
What is the correct way to do it?
<a href ="123.php?var=".$_GET['var']>Click here for more data from db</a>
Doesnt work
This should:
$moreData = $_GET['var'];
?>
<a href ="123.php?var=<?=$moreData?>">Click here for more data from db</a>
<?
Or you could do it with print or echo
$moreData = $_GET['var'];
echo "<a href =\"123.php?var=".$moreData."\">Click here for more data from db</a>";
Hope it helps. If not, I tried.
Svar=$_GET['var'];
print "<a href=123.php?var=$var>Click here</a>";
I remember trying this earlier but would'nt work then .
Now it is working fine.
Thanks very much.