hi fellas..
hope you guys are having a blast..
here's a scenario that has been bugging me..
i set up a form..
with a simple text area.
and i have three button..
- Cancel
- Add More User
- Done
so this registration.php looks like this
<form name="form1" method="post" action="process.php">
<p>
<input name="textarea" type="text" value="">
</p>
<p>
<input type="submit" name="button_cancel" value="Cancel">
<input type="submit" name="button_addmore" value="Add More">
<input type="submit" name="button_done" value="Done">
</p>
</form>
and the process.php looks like this
<?php
//if the cancel button was pressed
if(isset($_POST['button_cancel'])) {
header("Location: [url]http://[/url]".$_SERVER['HTTP_HOST']
.dirname($_SERVER['PHP_SELF'])
."/"."main.php");
exit;
}
//if the done button was pressed
if(isset($_POST['button_done'])) {
header("Location: [url]http://[/url]".$_SERVER['HTTP_HOST']
.dirname($_SERVER['PHP_SELF'])
."/"."thankyou.php");
exit;
}
//if the addmore button was pressed
if(isset($_POST['button_admore'])) {
header("Location: [url]http://[/url]".$_SERVER['HTTP_HOST']
.dirname($_SERVER['PHP_SELF'])
."/"."registration.php");
exit;
}
unfortunately for me...
only the cancel button works..
the rest of the button will make me stuck at the process.php, with a blank screen..
is it the redirection problem, or is it the way i do the conditioned if.
F.Y.I, i can only use form button.. and not any other type of linkage.. like text, pics, etc..
thanks in advanced..
hope you guys have a nice day 🙂
-jassh