what are you trying to do with the part of the action that is
?change22. i think you really need a value to assign to change22 to make it useful... or if that is the value, then add a key before it. i.e.
?change22=foo or
?foo=change22
you can access post variables like this:
$_POST['construction'] and
$_POST['op1']. Just note those array keys are based off the input "name" not the "id".
A good debugging technique is to print the $_POST array to see exactly what your form is sending. Note that this example would have to be placed above any code that prints to the screen because it contains a header function. You would place this at the top of change.php.
PHP Code:
<?php
// print debug output for data posted to this script
// only run if there is post data
if ($_POST) {
// set content type to text/plain so array is formatted nicely on screen
header('content-type: text/plain');
// now print the dump of the POST array
print_r($_POST);
}
?>
Now for an issue I see in your form. You are adding a variable inside plain html. PHP needs to know that you want to process that variable, so you need an opening PHP tag and to echo that variable. That line will work better like this:
PHP Code:
<input name="construction" type="hidden" id="construction" value="<?php echo $construction; ?>" />
Note with that, if your variable $construction contains any quotes, it will break the HTML form when printed. If you are not sanitizing $construction before it gets printed, you may want to consider doing so in that echo statement.
Here's an example on how to access the submission on change.php once it has been submitted :
PHP Code:
<?php
if ($_POST) {
echo 'The value of construction is: '. $_POST['construction'];
echo '<br />';
echo 'The value of op1 is: '. $_POST['op1'];
exit();
}
?>