If you put this in the same file as the form, make sure to change it to:
foreach($_POST as $field=>$array)
foreach($array as $id=>$newvalue)
$queries[$id] = isset($queries[$id]) ? $queries[$id].",'$newvalue
"REPLACE INTO pages VALUES ($id,'$newvalue'";
if (isset($queries))
foreach($queries as $id=>$query)
mysql_query($query.')') or die(mysql_error().$query.'
To test if the queries have been built
Otherwise, change the form action to point to the appropriate filename
Main Topics
Browse All Topics





by: matt_mcswainPosted on 2005-01-26 at 22:57:00ID: 13150044
If your using html arrays for your fields like this:
?>">|<inpu t type="text" name="pagealias[<?=$pageid ?>">|etc.
'" : )');
<input type="text" name="pagetitle[<?=$pageid
And your rows in your form are setup the same way left to right as your table fields;
you can put this wherever your form is being submitted.(If I understand you correctly)
foreach($_POST as $field=>$array)
foreach($array as $id=>$newvalue)
$queries[$id] = isset($queries[$id]) ? $queries[$id].",'$newvalue
"REPLACE INTO pages VALUES ($id,'$newvalue'";
foreach($queries as $id=>$query)
mysql_query($query.')') or die(mysql_error().$query.'