Created
March 21, 2012 04:38
-
-
Save varemenos/2144422 to your computer and use it in GitHub Desktop.
PHP - Self Executing Form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST['submit'])){ | |
echo $_POST['text'] . ' got submitted.'; | |
}else{ | |
?> | |
<form action="self_exec.php"> | |
<fieldset> | |
<input type="text" name="text" value="text" placeholder="Type here..."> | |
<input type="submit" name="submit" value="Submit"> | |
</fieldset> | |
</form> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment