php pass a link title to the next page
I'm trying to make automatically generated pages for users based on the
username. basically I'm creating a table in html which displays all the
users currently registered. the names are hyperlinks which redirect to a
page in which I will post a welcome message.
the problem is that I don't know how to pass the name of the user I click
on to the next page.
<table border='1'>
<tr>
<th>Username</th>
<th>Email</th>
</tr>
<?php
while($currentRow = mysql_fetch_array($query))
{
echo "<tr>";
echo "<td><a href='/templates/profile.php?name='".
$currentRow['name'] .">" . $currentRow['name'] . "</a></td>";
echo "<td>" . $currentRow['email'] . "</td>";
echo "</tr>";
}
?>
as you can see, I tried using get, but it won't work, I think it's because
it doesn't know what I'm clicking on. the point is that I want the page
with the welcome message say something like "welcome, $username". any
ideas?
No comments:
Post a Comment