|
Posted by Mike Smith on 10/01/06 11:07
Change:
> while ($c=0;$c<count($_POST['tourid']):$c++)
to (change the : before $c++ to ;):
for ($c=0;$c<count($tourid);$c++)
I think i mentioned the while loop in my first reply. I should have said for.
(See: http://us2.php.net/for, http://us3.php.net/while,
http://us4.php.net/foreach)
I'm not sure what you mean by "form is posted to itself". Do you have
the function at the top of the page with the form? If so, you can do
something like
if($_POST['var']){
add_to_database( $tourid, $dayno, $fromto, $bld, $descrip,
&$dberror)
//ideally you'd forward to another page to let the user know the form
was received OK...
} else {
//Show form
}
Please post any specific error message you may get, not just "a parse
error", it will save my eyes!
Thanks,
Mike
[Back to original message]
|