Is this right, because nothing happens when I hit the submit button:
<HTML>
<BODY>
<?php
$ok_button="<input type='submit' OnClick='document.forms['myForm'].submit();' value='approve!';"
echo $ok_button;
$form="<form name='myForm' action='myPhp.php'><input type='hidden' name='firstname' value='<?php echo $firstname;?>'></form>;"
?>
!!!ALOT OF CONTENT HERE!!!
<?php echo $form;?>
</BODY>
</HTML>
Please help me make this work! Thanks
UPDATE: OK, so the above has errors...
Another question pops up though...
Im trying to approve a form submitted from another page... But I dont want to insert anything into my mysql database, since the user might NOT approve the form. So the values I have in this php file is received from a main-form, and in that main form, users can choose categories! This means I have to create alot of 'if' statements if I want an approve form, right?
Example to clarify:
User submits main form with the value 'CARS' chosen from a drop down list. The action is myPhp.php.
In MyPhp.php the approve page exists. Here I want the user to approve the previous form. Then hit enter, and the data is put into the database. Problem is, I dont know what the user chose in that drop list, so I would have to make alot of 'if' statements.
Then I would have to write a form with php, which you can see im trying, and then submit the form with the right values...
Any other simpler way :) ???