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

PHP template help
Ok, I don't know if anyone can help me but I am using PHP templates to make a site. I am a newbie an

Need help-Error istream header declaration
Hi Everyone ,

I am having issue with istream declaration. I am new to C programming.
can a

using file_get_contents??
okay how would i create a script using file_get_contents() in php have it grab search pages 1-20 and

Which PHP-Editor do you think is the best?
Hi everyone,
Myself Brian Anderson. For the last 2 years i have been working a

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

eregi to preg
Im converting my regex for php 5.3 and I am stuck on the following

Code: [Select]if((eregi(&q

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

"SEO" URLs
Hey, I'm wondering how to go about creating and using these types of URLs. I'm presuming it's PHP th

SAP FICO learning materials
Hi all,
I am new to this world of SAP FICO. I have taken training on SAP FICO, but was wonderin

Registration
ok so i have a site where people can register and login which works now thanks to someone on here th

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