how get value in field in php code example

Example 1: get text field value in php

<form method="post">
  <input type="text" name="deleteinput" class="button"/>
  <input type="submit" name="deletebtn" class="button" value="Delete single user data"/>
</form>
  // php 
<?php 
    $name = $_GET['deletebtn'];
    echo $name;
?>

Example 2: how to get input value in php variable

$info = array('Doina', 'brown', 'long');

// Listing all the variables
list($she, $color, $hear) = $info;
echo "$she has $color eyes color and $hear black hair.\n";

Tags:

Php Example