A little help needed passing hidden values to next page


Posted on 16th Feb 2014 07:03 pm by admin

I have a page that has hidden values in a form.

example
Code: <input name='signupID' type='hidden' value='1' />
<input name='signupID' type='hidden' value='2' />
<input name='signupID' type='hidden' value='3' />
<input name='signupID' type='hidden' value='4' />

also within this form, the user enters details, name, phone number etc.

On the next page i need these hidden values to compare to the ID in the database so i can update the rows based on this hidden value.

I have obviously taken a wrong route here becuase i am getting warning after warning.

The code i have tried is this:
Code: if(isset($_POST['signupID'])) {
foreach($_POST['signupID'] as $item) {
echo "<input name='signupID' type='hidden' value='". $item . "' />";

but i get this: Warning: Invalid argument supplied for foreach() in C:wwwwasp-control.co.uk on line 79

The idea is that once the user has filled in the form, hits submit, next page compares the database to these hidden values "1,2,3,4" and then updates the database where the ID in the database is "1,2,3,4"

Any help here would be great

No comments posted yet

Your Answer:

Login to answer
207 Like 26 Dislike
Previous forums Next forums
Other forums

unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.

SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built

Ten Operator Syntax
Hi Guys,

I can't figure out why i am getting a parse error with this basic ten op code:

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

SESSION CHECK WORKS "MOST" of the time... whats going on?
i have a sign in check thats included in every page that is a members only page which is basically a

Weird MySQL error, why am I recieving this?
PHP Code:


<?php require "global_settings.php"; ?>
<titl

Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a swit

pagination - need help on passing of search query.
Hi, i have been trying for days but couldn't get this sorted out. Would like some professional help

Add_Months not Easy to Understand
Oracle is number 1, very fast and very easy. But....
OK, I think but have a problem, only 1 pro

Retreiving objects from Sessions
Hi all,

I am getting really frustrated with storing and retreiving objects from a session. Bu

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash