|
Post by Awaissoft on Dec 20, 2013 10:24:40 GMT
I want to execute some scripts only when the user confirms. sample code like this
if($confirm)
{
some script
}
else
{
other script
}
there is two buttons 'confirm' and 'discard' if confirm is clicked $confirm = true;
|
|
|
Post by fstorm on Dec 21, 2013 7:49:00 GMT
<fieldset><legend>Confirm or Discard</legend>
<!-- confirm form --> <form method="post" action="yourscript.php"> <input name="option" type="hidden" value="1" /> <input type="submit" value="Confirm" /> </form>
<! -- discard form --> <form method="post" action="yourscript.php"> <input name="option" type="hidden" value="0" /> <input type="submit" value="Discard" /> </form> </fieldset>
<?php // yourscript.php
if(isset( $_POST['option'])) { if($_POST['option']) { // confirm } else { // discard } }
// EOF yourscript.php
|
|
|
Post by Awaissoft on Dec 21, 2013 8:00:45 GMT
thank you for the script i will try it.....
|
|