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

FPDF Help
I've been playing with the FPDF module. I was building a form and rolling right along and then sudde

[RESOLVED] Socket/Port remains open after app crashes
I'm having this problem with a networked app in vb.net.

If the program exits normally the por

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

Add "width" check when upload
Hi!

Can someone add a function that is checking if picture witdh is bigger then 800px whwn up

Hotlinking Picasa as the image folder of a website
Hi there PHP freaks, I would like to create a private album in Picasa to use it as the image folder

PHP / MySQL Associative Multidimensional Array:
Hello.

I have data in a MySQL Table that adheres to the below: (note, no index, could add if

Hom to make one url to open together with another url
I have a chat, which i want to be opened, as soon as the users login to the site. As it is now, when

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

Line break?
Hi, I'm new to the forum and new to php. I'm not sure if I'm using the correct terminology so here i

BIG file upload!
Hey guys!

I'm trying to upload a file, it works well with smaller files but with 60mb+, I get

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