SilverNodashi
Expert Member
- Joined
- Oct 12, 2007
- Messages
- 3,337
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 <select box> <text field>
8 Ann <select box> <text field>
97 Peter <select box> <text field>
35 Collin <select box> <text field>
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?
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 <select box> <text field>
8 Ann <select box> <text field>
97 Peter <select box> <text field>
35 Collin <select box> <text field>
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:
PHP:
<?PHP
$userids = JRequest::getVar( 'userid' );
$userchecks = JRequest::getVar( 'check' );
$reasons = JRequest::getVar( 'reason' );
if (isset($userids)) {
foreach($userids as $userid ) {
echo '<i>UserID:</i> '.$userid.' <i>Visit:</i> '.$usercheck.' <i>Reason: </i>'.$reason.'<BR>';
}
}
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?