I'm not sure if I'm understanding correctly, but you might
take a look at this modification...
Notice: all lines with a > in front of them have remained
unchanged. Lines that can safely be deleted are preceeded by
single-line comments (//), and lines without a > are newly
added lines.
$allFieldsFilled = true; // assume this is true until we
prove it to be false (all it takes is once!)
for ($i=1; $i<=5; $i++) {
if ($row["num$i"] == '') {
printf ("You have to goto Scene$i<p>");
$allFieldsFilled = false; // something hasn't been
filled yet
} // if
} // for
if ($allFieldsFilled) {
printf ("You don't have anything to fill<p>");
} // if
Intention: loops through all fields, printing "You have to
goto Scene$i" for each field that is empty. However, if no
fields are empty, "You have to goto..." should never be
printed and "You don't have anything to fill" should
instead.
I could've read your problem wrong, too, though. Good luck.
--Toby
--Toby
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]