Skip to content

Instantly share code, notes, and snippets.

@varemenos
Created March 21, 2012 04:38
Show Gist options
  • Save varemenos/2144422 to your computer and use it in GitHub Desktop.
Save varemenos/2144422 to your computer and use it in GitHub Desktop.
PHP - Self Executing Form
<?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