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' />
Did you know?Explore Trending and Topic pages for more stories like this.
<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

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

Problem with a select distinct
I have a problema with a select distinct, I have the next sql:

select distinct a,b,c,d fr

Unable to retreve the values from Mysql Query
Hi,

Here is the php code that I have, Query is running properly in phpmyadmin and is resu

wav to mp3 + goDaddy
I need to convert wav files to mp3s. From what I have found so far one way to do it is to have my PH

Function
How can I make this function that once you click the link in the code it takes you to a new page wit

php libs/ browsercap.in
ok i have a host that refuses to stay current. they control my php settings and libs. is there a way

Multi dimensional arrays
If I put in this code:

1
2
3
4
5
6
7
8
9
10
11
12
13<

Login script (probably a simple error)
dbConfig.php
Code: <?
// Replace the variable values below
// with your specific dat

delete comma
HI,

How to delete "," at the end of the string.
Code: $match = 2009/02/03/a2corr

What are causes of a connection-timeout with fopen()?
Hello! Here is the situation: The server I host my website on just upgraded it's PHP build from 4.4.

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