Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php post

<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") {
  // do logic
  $name = $_POST['fname'];
}
?>
Comment

php post request

$url = 'http://server.com/path';
$data = array('key1' => 'value1', 'key2' => 'value2');

// use key 'http' even if you send the request to https://...
$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded
",
        'method'  => 'POST',
        'content' => http_build_query($data)
    )
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }

var_dump($result);
Comment

post php

<?php
echo 'Hello ' . htmlspecialchars($_POST["name"]) . '!';
?>
Comment

Php post request

<html>  
   <body>  
     
      <form action = "posttest.php" method = "post">  
         Username: <input type = "text" name = "username" /> <br>  
         Blood Group: <input type = "text" name = "bloodgroup" /> <br>  
         <input type = "submit" />  
      </form>  
        
   </body>  
</html>  
Comment

PREVIOUS NEXT
Code Example
Php :: laravel difference between current time and created time 
Php :: how to create shortcode 
Php :: check if url is https laravel 
Php :: use class Auth larave3l 
Php :: laravel random record 
Php :: php array remove value if exists 
Php :: php base64img to file 
Php :: php object(stdclass) to array 
Php :: laravel date default now 
Php :: update-alternatives java 
Php :: php check of object is empty 
Php :: if exist php 
Php :: php get and print file contents 
Php :: format time laravel 
Php :: Add Product Short Description To Product Category In WooCommerce 
Php :: php include and require statements 
Php :: laravel load view in variable 
Php :: wp get field taxonomy 
Php :: laravel custom 404 blade 
Php :: how to set a validation on a value if its not null in laravel php 
Php :: how to display the responce of curl in php 
Php :: google translate api php 
Php :: laravel if syntax 
Php :: max. post size 
Php :: woocommerce check if user is logged in 
Php :: php str to int 
Php :: joomla cache programing clear 
Php :: Laravel Validation error message in blade or view 
Php :: php mongodb version cmd 
Php :: insall laravel 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =