You are here: Re: [PHP] Multiline data Insert Into table from a generated form? « PHP « IT news, forums, messages
Re: [PHP] Multiline data Insert Into table from a generated form?

Posted by Alp on 10/03/47 11:07

Hi Chris,

Thanks for reminding but until I'm done with the whole thing it is operating
on a PC and that's why the username/password are the default. Even the DB
name is for testing only.

Alp

"Christopher Fulton" <christopher.fulton@gmail.com> wrote in message
news:bbbb9b3e050204130464f0ae8a@mail.gmail.com...
> [snip]
> > //user connection section--begin
> > $username="root";
> > $password="";
> > $database="nazardane";
> [/snip]
>
> If this is actually your login, I would suggest changing it right away
>
> [snip]
> > while ($c=0;$c<count($_POST['tourid']):$c++)
> [/snip]
>
> Like Mike already said, that should be a for loop. But, you do have
> one other option, that I prefer...A foreach loop.
>
> foreach($_POST['tourid'] AS $tour_id {
> ... now in your code use $tour_id instead of $_POST['tourid'][$c]
> }
>
> -Chris
>
> ps...You may want to read through the php turorial again. Lots of
> helpful information there. http://us2.php.net/tut.php
> --
> Christopher Fulton
> http://www.fultonfam.com

 

Navigation:

[Reply to this 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

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