You are here: Re: Getting two variables from a PHP loop « PHP Programming Language « IT news, forums, messages
Re: Getting two variables from a PHP loop

Posted by chimambo on 05/24/07 15:02

On 19 May, 10:21, Floortje <l...@zingmaarmetmijmee.enel> wrote:
> chima...@googlemail.com schreef:> On 18 May, 20:16, Floortje <floor...@dont.mail> wrote:
> >> Floortje wrote:
>
> >> Im an idiot :-)
>
> >>> $sql="UPDATE $db SET enrolled='".$person['enrolled']."',
> >>> date='".$person['date']."' WHERE id = '$id'";
> >> --
> >> Arjenwww.arjenkarel.nl--my crappy excuse for a website (just gathering dust)
>
> > Still not inserting the values. Maybe let me get an exact extract from
> > my code:
>
> The code shoudl work after a liitle modification.
>
> Try var_dump($_POST) and see what you get
>
> --
> Arjenhttp://www.hondenpage.com


I have tried but to no avail. I am able to get the values of the text
box. But what I am not sure is how to handle the checkbox values. You
suggested:

<input type="text" name="person[1][enrolled]">
<input type="text" name="person[1][date]">
<input type="text" name="person[2][enrolled]">
<input type="text" name="person[2][date]">

But what I actually need is:

<input type=checkbox name=box[] value="X"> -- Supposed to insert "X"
if checked
<input type="text" name="person[1][date]"> -- Deals with variable
dates per corresponding checkbox
<input type=checkbox name=box[] value="Y"> -- Supposed to insert "Y"
if checked
<input type="text" name="person[2][date]"> -- Deals with variable
dates per corresponding checkbox

 

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

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