Forum Moderators: coopster
Firstly make sure you can pull the information properly from the Mysql database and display it on a web page nicely using the echo statements in php.
When creating the name column just simply in the html create a link to another page. Something like:
<?php echo"<a href='result.php?id=$name'>$name</a>";?>
When clicked the $name will be sent to the result.php page and this will be the page programmed to extract all the information about $name.
In the result.php page just do a simple
$query = "select * from table where name ='$name'";
Hope this helps a little.
"When creating the name column just simply in the html create a link to another page."
I don't know exactly what that means. When you say "when creating the name colum", where in my code am I creating this column? I just dont know where to put the code. And is it its own php script, or can i strip the <? off it and just plug it inside the rest of the page?
thanks
php allows you to create a normal html page and you can insert <?php?> any where within a normal html file.
So when designing your table results create it in normal html
Then insert your php statement <?php?> where you want the result to appear!
<table>
<tr>
<td>
<?php echo"<a href='results.php?name=$name'>$name</a>";?>
</td>
</tr>
</table>
This <?php echo"<a href='results.php?name=$name'>$name</a>?> should create a link to another page and when clicked it will be sending the name of the person through the url, that will tell your results.php page which name to get abstract from the database.
I think you are looking at it to hard, remember you can insert <?php?> any where with in a html file. instead of just echoing normal text you echo a link!