Search
 
SCRIPT & CODE EXAMPLE
 

PHP

PHP Superglobal - $_REQUEST

<html>
<body>

<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
  Name: <input type="text" name="fname">
  <input type="submit">
</form>

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
  // collect value of input field
  $name = $_REQUEST['fname'];
  if (empty($name)) {
    echo "Name is empty";
  } else {
    echo $name;
  }
}
?>

</body>
Comment

PHP Superglobal - $_GET

<html>
<body>

<?php
echo "Study " . $_GET['subject'] . " at " . $_GET['web'];
?>

</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Php :: check if product has crosssell woocommerce 
Php :: Befreie den WordPress-Header von unnötigen Einträgen 
Php :: redirect www to non-www wordpress multisite 
Php :: RouteSubscriber disallow user routes 
Php :: ob_start store variable in php 
Php :: phpexcel set data type 
Php :: mysql php update sum same table 
Php :: 200usd to php 
Php :: how to select specific id in laravel using isset 
Php :: laravel restore deleted 
Php :: install php 7.4 
Php :: Header requirements for new plugin in wordpress 
Php :: $n = readline(); for($i = 0; $i < $n ; $i++) { $name = readline(); $names[$name] = (isset($names[$name]) ? $names[$name] + 1 : 1); } 
Php :: codeigniter 4 multiple validate error 
Php :: how to get textbox value in php without submit 
Php :: list custom post in wp 
Php :: laravel eager loading pass variable in withCount where condition 
Php :: orwhere raw where condtion 
Php :: laravel livewire public property 
Php :: if is gutenberg page php wp 
Php :: selecting values from database 
Php :: First-class Callable Syntax - PHP 8.1 
Php :: google calendar api push notifications php 
Php :: formidable forms formsLimit logged-in users to two entries per day 
Php :: PHP str_rot13 — Perform the rot13 transform on a string 
Php :: html vs php 
Php :: trait class has consttoctor 
Php :: add document by api php 
Php :: drupal 9 custom local stream wrapper 
Php :: avoid sql injection in password field 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =