You are here: Form inside loop, need to wait till submit is activated. « PHP Programming Language « IT news, forums, messages
Form inside loop, need to wait till submit is activated.

Posted by rjames.clarke on 11/07/38 11:26

I have the following.

$result=mysql_query($sql);
$nrows=mysql_num_rows($result);
for ($i=0;$i<$nrows;$i++)
{
$row_array=mysql_fetch_row($result);
echo "<form name='testform' action='ins_op.php' method='post'>";

lots of form stuff

echo "<td><input type='submit' value='Save'>";

echo "</form>";
}

I'd like to have the loop wait until the form submit is pressed before
it continues and grabs the next record from $row_array.

Right now the code displays all the records with their submit buttons.

Doing it in this form permits one query to the database to get all the
open records.

Alternative code structures would be entertained.

thanks

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация