Skip to content

Instantly share code, notes, and snippets.

@LocalCommit
Created April 10, 2015 06:10
Show Gist options
  • Save LocalCommit/4ffa02192d5277e02422 to your computer and use it in GitHub Desktop.
Save LocalCommit/4ffa02192d5277e02422 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Form Example</title>
</head>
<body>
<form action="name.php" method="post">
<div><label for="name">Name:
<input type="text" name="name" id="name"></label>
</div>
<div><input type="submit" value="GO"></div>
</form>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Form Example</title>
</head>
<body>
<p>
<?php
$name = $_REQUEST['name'];
if ($name == 'Kevin')
{
echo 'Welcome, oh glorious leader!';
}
?>
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment