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
26
Other forums
Simple email form - Newbie
Hello all,
First time poster!
I've been asked to create a simple HTML form that submit
Allowing ' and "
Hello everyone,
I am creating a form where users submit information to go into a database. I
shift numbers with paging
Hi
How would i be able to display 10 numbers 1 2 3 4 5 6 7 8 9 10
and when I click next
VAT
how should I deal with VAT?
if I have a product that costs £5.00 and VAT @ 17.5% (£0.87
Load file in PHP
I have 2 files. The first is a PHP generated XML file that's dependent by 2 inputs. The second is a
Update not working ... please help
Hi,
I am trying to update a row using an edit form by passing id of the row .. but it is not
Mail sending is slow on server
Why mail is taking time to be send on apache-linux server
How to make a mail Form secure?
I want to create an email Form on my web site. How can I make the Form secure so the submitted info
Exporting new records
Trying to figure out the best way to set this up.
People register my site.
Their prof
Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi