user93127
0
Q:

php form

<form method="GET">
  <input type="text" name="someName">
  //The Name Attribute will be put into the _GET inside of php 
  <input type="submit" value="Submit">
 </form>
  
<?php
$var = $_GET("someName");
echo ($var);
?>
4
<?php 
/* $_GET */ 
if(isset($_GET['submitGet'])) {
  die($_GET['submitGet'];
}
?>

<!-- GET -->
<form method="GET">
  <input type="text" name="name" placeholder="Name">
  <button type="submit" name="submitGet">Submit $_GET</button>
</form>

<?php
/* $_POST */ 
if(isset($_POST['submitPost'])) {
  die($_POST['submitPost'];
}
?>
      
<!-- POST -->   
<form method="POST">
  <input type="text" name="name" placeholder="Name">
  <button type="submit" name="submitPost">Submit $_POST</button>
</form>
2
<form action="action.php" method="post">
 <p>Votre nom : <input type="text" name="nom" /></p>
 <p>Votre âge : <input type="text" name="age" /></p>
 <p><input type="submit" value="OK"></p>
</form>
//taken from the php doc
2

New to Communities?

Join the community