Reply to Re: [PHP] Multiline data Insert Into table from a generated form?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация