Tuesday, September 3, 2002, 6:49:25 AM, you wrote:
MK> Everything is good, Everything is fine, so I decide to put the same=20
MK> snippet of code in again, this time pointing to a different page --
MK> page lets you edit the fields, the other shows you the final output,=20
MK> the item from the database featured on a web page.
MK> <p>preview an endpage:</p>
MK> //create a list of editible items
MK> echo "<form method=3Dpost action=3Dpreview.php>";
MK> echo "<select name=3Did>";
MK> for ($i=3D0; $i <$num_results; $i++)
MK> $row =3D mysql_fetch_array($result);
MK> echo "<option value=3D$row[id]> $row[id], =
MK> echo "</select>";
MK> echo "<input type=3Dsubmit name=3Dsubmit>";
MK> echo "</form>";
MK> The second instance does not work, I get a select with "," as each=20
MK> option, no population with the id or productname. Clearly, I don't=20
MK> understand something here, can anyone tell me what?
MK> Thanks for the time,
To use the result a second time you will need to reset the internal mysql
pointer like this:
After the first loop through.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php