Hi, I have some code which loops and prints links. Each link has different values for its variables on the end of the URL. As someone pointed out the other day it would be better for security to use a post instead, I just cant think of a way to do it with this code. The code is this:
Thanks, Andy.
PHP Code:
$rota_type_query = "SELECT rota_id, rota_name, no_required from rota_type";
$rota_type_result = mysql_query($rota_type_query);
$num_rows = mysql_num_rows($rota_type_result);
if($num_rows>0)
{
print "<table>";
while($rota=mysql_fetch_array($rota_type_result))
{
$rota_id=$rota["rota_id"];
$rota_name=$rota["rota_name"];
$no_of_people=$rota["no_required"];
print "<tr><td>$rota_name </td><td><a href='edit_rota_type.php?rota_id=$rota_id&rota_name=$rota_name&no_of_people=$no_of_people' target='_self'>edit</a></td>";
print "<td><a href='delete_rota_type.php?rota_id=$rota_id&rota_name=$rota_name&no_of_people=$no_of_people' target='_self'>delete</a></td></tr>";
}
}
Comment