Re: PHP Post & forms

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

 



On 4/13/06 7:40 PM, "Gary E. Terry" <terry@xxxxxxxxxxxxx> wrote:

> Quite possibly a stupid question, but here goes.
>  
> I have a form that is a list of jobs. On that list is a
> checkbox. The form field is named 'changedate'.
>  
> I also have a hidden field called 'JobID'.
>  
> What I am trying to accomplish is if a checkbox is
> checked, when the form is submitted, I want all of
> the JobID's to be updated by an SQL query.
>  
> But it seems to me that $_POST will only contain
> the last JobID in the form, no matter what. Am I correct
> on this?
> 
> Is what I am trying to accomplish not possible with a
> form post?
>  
> I think I remember doing something similar with Cold Fusion
> years ago, but I have never attempted this with PHP.
>  
> Any suggestions? 

You need to pass the checkboxes as an array value with the JobID as the
identifier. 

Then on the other side, you can run through the list of JobID's and see
which ones need to be updated.

Hope this helps




-- 
Stephen Johnson
The Lone Coder

http://www.ouradoptionblog.com
*Join us on our adoption journey*

stephen@xxxxxxxxxxxxxxxx
http://www.thelonecoder.com

*Continuing the struggle against bad code*
--

-- 
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