Script

Show Script

Showing code for: button.irev

Back

<?rev
   -- Standard header -------------------------------
   put "Troz : : On-Rev" into tHeader
   include "../../includes/header.irev"
   
   include "../../includes/menu.irev"
   --------------------------------------------------
?>

   <?rev include "includes/scriptlink.irev" ?>
   <h1>Button</h1>
   
   <p>
   This script shows how to use a button and a hidden form field to change what happens when the page loads. 
   </p>

   <?rev   
      if $_POST["click"] = "buttonClicked" then
         put "Thank you for clicking the button on " & the internet date
   ?>
      
         <br /><br />
         <a href="button.irev">Click here to reload and see the button again.</a>
         <br />
         (Refreshing will send the form data again and not show the button.)
         
   <?rev            
      else
         put "Please click the button below."
   ?>

         <br /><br />
         <form method="post" action="button.irev">
            <input name="click" type="hidden" value="buttonClicked" />
            <input type="submit" value="Click Here">   
         </form>
   
   <?rev
      end if
   ?>
   
<?rev
   -- Standard footer -------------------------------
   include "includes/showIncludes.irev"
   include "../../includes/footer.irev"
   --------------------------------------------------
?>