Re: Multiline data Insert Into table from a generated form?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux