I'm starting on the quest of Php programming, which for the most part has been extremely fun, yet I have one, I assume, simple problem.
I'm printing out a table with the results from a query using while and for loops, like this
//(table body)
while ($row=mysql_fetch_row($result))
{
echo "<tr align=left>\n";
for ($i=0; $i<$num_cols; $i++)
{
echo "<td>";
if (!isset($row[$i])) // valor vacio (empty value test)
{echo "VacĂo";}
else
{echo "<font face=\"Verdana, Arial, Helvetica, sans-serif\" size = \"2\" color=\"#990000\">\n";
echo $row[$i];
}
echo "</td>";
}
// this is the problem!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo "<td><a href=edit.php> <font size = \"2\" color = \"#3300FF\"> Editar";
echo "</td>";
echo "</tr>\n";
}
echo "</table>";
//termina la construccion de la tabla (table body)
as you can see it is a simple horizontal table with the results listed in rows, and a final cell in each row displaying the word "Editar" linked to another php file.
The link will send the user to the edit.php file, but I need to send the value of the index returned by the mysql_query function, so that edit.php displays only the info for that particular row, allowing the user to update the info.
Tukan
I know it's got to be simple...