Sample Code: Simple Form Processing in PHP

<?php

 if(isset($_POST['submit'])){
    echo $_POST['name'];
 }else{

?>
<html>
<body>
  <form method="post" action="">
    <input name="name" id="name" type="text" />
	<input name="submit" id="submit" value="Add Me" type="submit" />
  </form>
</body>
</html>
<?php
}
?>

Leave a Reply