Hi All
I have a problem with a a page with 2 forms on it.
The first form controls the input from a drop down list and the second has a series of text boxes.
When I submit the form I cannot get any values from the second form. I'm currently modifying someone elses code and have addded the second form.
Text boxes are named but appear in the url, whihc is strange as the form is post - this is, however, nested in another form that is get. Can this be done ?
I've tried switching both forms to get and extracting the value from the url but although it is visible in the url I still get nothing.
The code to check the submit is:
if($_POST['submit'] == 'process') { echo "process"; }
print "value: ".$_POST['negValue']."\r\n";
The form def is:
<form name="choose_c" action="'.$newLocation.'" method="get">
<form name="process" action ="" method="post">
And the input text boxes are defined as:
$negAmount = '<input type="text" value="'.$invoice["amount"].'" name="negValue" id="'.$invoice["payment_ref"].'" /> ';
The submit button looks like this:
<tr><td><input type="submit" value="Update" action="document.forms[1].submit()"/></td></tr>
Is the problem due to the fact that the forms are nested with GET and POST ?
$negAmount is always empty on submit ...
Cheers
Steve