I want to update rows and columns with one submit action.
I created a loop that presents a table with updateable fields to the viewer.
I want to have a submit that sets the info.
in the "SET" command, can I have a loop?
here's the loop that presents the info:
while($row = mysql_fetch_row($result))
{
for ($column = 0; $column < 5; $column++)
{
echo " $row[$column] "</td>";
}
}
Here's a link to the downloaded info page:
http://www.southerninvestmentmortgage.com/get6l_name.php
Can I use the same loop to set the info?
If so, then how.
Here's my attempt to create a loop that sets the posted variables, but it doesn't work.
Thanks
<?
@ $db= mysql_pconnect("localhost:3306", "a0022423", "preven66");
if (!$db)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
}
mysql_select_db("a0022423");
while($row)
{
for ($column = 0; $column < 5; $column++)
{ $query = "UPDATE 30yrFixedConforming SET $row[$column]='$row[$column]'";
}
}
What am I doing wrong? Am I not grabbing the posted variables? I'm obviously not setting them.
Thanks