My website shows results from a MySQL database using PHP into an HTML table.
What I want, at the end of each row, is an 'edit' link, which takes you to a page called edit.php and posts the variables of the row which you clicked edit on.
This is my code so far:
The bit in bold is what I need to get working. Right now, it works as a link to edit.php, but I need it to post the row variables too.
Any ideas? Thanks.
What I want, at the end of each row, is an 'edit' link, which takes you to a page called edit.php and posts the variables of the row which you clicked edit on.
This is my code so far:
Code:
$result = mysql_query("SELECT * FROM name_number_table");
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo '<td>' . $row['name'] . "</td>";
echo '<td>' . $row['number'] . "</td>";
[b]echo '<td><a href="edit.php">' . $row . "</td>";[/b]
echo "</tr>";
}
echo "</table>";
The bit in bold is what I need to get working. Right now, it works as a link to edit.php, but I need it to post the row variables too.
Any ideas? Thanks.