RE: [PHP] Multiple insert question

From: Date: Wed, 13 Sep 2000 03:35:08 +0000
Subject: RE: [PHP] Multiple insert question
Groups: php.general 
Request: Send a blank email to php-general+get-16484@lists.php.net to get a copy of this message
>basically, you'll probably have to use a while loop to insert the information changing the vars every time. > >ie. >while ($row = mysql_fetch_row($resultset)) { > list($name) = $row; >$isql = "insert into table (field1,field2,field3,field4,field5,field6) >values >('$name','$value1','$value2','$value3','$value4','$value5')"; >mysql_db_query($dbname,$isql,$db); >} Hello thanks for the reply. I think this will work, but I need a little more guidance. My first page is where I pull the name# information from table1. I then use those values to populate a form and add form names of value1 - value5. So the above information is posted to another PHP page that will do the actual inserts. So the "while($row=mysql_fetch_row($resultset)) {... has already been done on the previous page. My question is...what would the while loop look like since I will not be pulling any information from the db? I already have all the values in the previous page. The problem is that the variables only give the values for the first "row". In case my original post is helpful http://marc.theaimsgroup.com/?l=php-general&m=96871332800855&w=2 TIA, Scott

« previous php.general (#16484) next »