Search This Blog

$_POST() in php

<?php

if(isset($_POST['name'])&&isset($_POST['age']))
{
  $name=$_POST['name'];
  $age=$_POST['age'];
  if(!empty($name)&&!empty($age))
  {
   echo '<center>you filled both fields<br><br></center>';
  }
  else
  {
   echo '<center>you not filled both fields<br><br></center>';
  }

}

?>
<center><form action="post.php" method="POST">

               NAME :<input type="text" name="name">

               AGE  :<input type="text" name="age">

                <input type="submit" value="submit">
</form></center>

output :


output :

after filled all fields you clicked on submit button just vies on address bar
it not displays you entered data

Share Links

Related Posts Plugin for WordPress, Blogger...