Skip to content

Instantly share code, notes, and snippets.

@isstaif
Created March 31, 2013 11:16
Show Gist options
  • Save isstaif/5280318 to your computer and use it in GitHub Desktop.
Save isstaif/5280318 to your computer and use it in GitHub Desktop.
A simple form in HTML and PHP
<html>
<head></head>
<body>
<form action='http://localhost/home.php'>
Title: <input type=text name=title /><br />
Body: <input type=text name=body />
<input type=submit />
</form>
</body>
</html>
<html>
<head></head>
<body>
<?php
$post = array(
'title' => $GET['title'],
'body' => $GET['body']
);
echo "<h1>".$post['title']."</h1>";
echo "<p>".$post['body']."</p>";
echo "<hr />";
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment