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 :: for else laravel 
Php :: laravel where on relationsship column 
Php :: Syntax error or access violation: 1071 La clé est trop longue. Longueur maximale: 1000" 
Php :: php bcrypt password verify 
Php :: laravel pagination number of items 
Php :: laravel auth check login 
Php :: laravel where 
Php :: Remove last symbol from string 
Php :: how to get yearly chart in laravel 
Php :: Proc file for laravel 
Php :: instalar php 7.4 no ubuntu 
Php :: laravel where equal 
Php :: laravel query order by relation 
Php :: php html template if conditions 
Php :: php ?? 
Php :: laravel activity log package 
Php :: wp image size names 
Php :: find days with name between two dates in php 
Php :: php function uppercase first letter 
Php :: laravel custom validation message 
Php :: get value from url in laravel blade 
Php :: set posts_per_page 
Php :: wordpress get plugin list 
Php :: php clean user input 
Php :: custom autoload without composer 
Php :: php undefined function mysqli_fetch_all() 
Php :: Installing Maatwebsite excel import export package 
Php :: insert batch in laravel 
Php :: @lang laravel blade 
Php :: php move element to beginning of array 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =