Simple HTML / PHP posting Problem -- I've tried everything!
Posted: Wed Oct 13, 2010 6:56 pm
Hey guys,
I've been stuck on trying to get this super simple HTML form to $_POST and echo back in my php output file
. Any solutions would be greatly appreciated!
HTML---------------------------------------------------------------------------------------------------------------
I've been stuck on trying to get this super simple HTML form to $_POST and echo back in my php output file
HTML---------------------------------------------------------------------------------------------------------------
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="drewman" />
<title>Untitled 16</title>
</head>
<body>
<form action="sendform.php" method="POST">
<p> First name:</p> <input type="text" name= "firstname" /></p>
<p>Last name:</p> <input type="text" name= "lastname" /></p>
<input type="submit" value="send" />
</form>
</body>
</html>
PHP Output---------------------------------------------------------------------------------------------------------------
<?php
echo $_POST["firstname"];
echo $_POST["lastname"];
?>