Search This Blog

$_get() in php

<?php

if(isset($_GET['name'])&&isset($_GET['age']))
{
  $name=$_GET['name'];
  $age=$_GET['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="get.php" method="get">

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

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

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

output :

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

Share Links

Related Posts Plugin for WordPress, Blogger...