how to get multiple form values as variables in PHP?

Posted by SoftDux, 03-06-2010, 01:21 PM
Hi, Can someone please help me with this? I have a form, which is dynamically build from a database, as follows: ID ---- Username ------Visit ------ Reason | | | | 12 John 97 Peter So, basically there's an ID & username that's being pulled from the DB. This list is dynamic, depending on various factors so the length will differ every time. Now, I need to save this info into a different table, but only the "ID", "Visit" and "Reason" fields' date. The problem is, when I submit this form to the script, all field are submitted as variables and I need to extract those variable values. But, how? I have the following (slightly modified so far, but it isn't helpful: From here, the "userid" field get returned fine, but the "usercheck" & "reason" variables return as empty values. How do I get those values as well, for that row?

Posted by MammothVPS, 03-06-2010, 07:42 PM
You probably want to use an index variable so you can loop through all three arrays at the same time, like: Last edited by MammothVPS; 03-06-2010 at 07:43 PM. Reason: Fix php tag syntax

Posted by SwordfishHostingLtd, 03-07-2010, 12:22 PM
It would be useful to see a snippet of html in the form you are submitting to see if the problem lies there or in your php - do you have this you can post?

Posted by SoftDux, 03-07-2010, 05:22 PM
I got it, from another forum, here : @SwordfishHostingLtd, the problem wasn't in the HTML form, but purely in my PHP code

Was this answer helpful?

 Print this Article

Also Read

Sortable Table

Posted by AvailNetworks, 03-02-2010, 10:42 PMsorry if I sound like a moron when it comes to...

CPanel - Change email password without logging into Cpanel

Posted by keith70, 03-14-2007, 12:48 PMIs there a script out there that will allow a user to...

New PHP Exploit

Posted by jon-f, 09-11-2007, 06:27 PMcheck this out...

Opening a new page in an iframe, is it possible?

Posted by bambinou, 02-09-2011, 01:49 PMHi All, I have an iframe here: In this iframe I...

Need to run this shell file in the background every 10 secs

Posted by mikey1090, 03-19-2007, 04:44 PMThe following shell script (a php loop to run a file)...