You are here: Re: Looping INSERT from checkbox info « PHP SQL « IT news, forums, messages
Re: Looping INSERT from checkbox info

Posted by Bob Stearns on 10/09/66 11:42

Aaron Reimann wrote:

> This is kind of what I need (I think):
>
> if (is_array($_POST['comments']['id'])):
> foreach ($_POST['comments']['id'] as $id):
> $insert = "INSERT INTO people (username, id_people,
> id_ministry) VALUES ($_SESSION[valid_user], $people_id, $id";
>
> $mysql_insert = mysql_query($insert, $mysql_link)
> or die("Bad query: ".mysql_error());
> endforeach;
> endif;
>
That is much closer to what you want. Where is $people_id coming from at
this time? Why aren't you inserting/updating comments? Are all of your
id columns (from the previous post) auto incrementing?

 

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

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