Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php receive get

// Send data trough e.g. AJAX in JavaScript

$.ajax({
    type: "GET",
    url: 'example.php',
    data: { "num1": 1, "num2": 2},
    contentType: "application/json; charset=utf-8",
    dataType: "JSON",
    async: false
})

// You would receive it like this:
  
$num1 = $_GET["num1"];
$num2 = $_GET["num2"];

$sum = $num1 + $num2;
echo $sum;

// Would output: 3
Comment

PREVIOUS NEXT
Code Example
Php :: php discord webhook sender 
Php :: how to reduce time taken by php script on server 
Php :: php include inside function global 
Php :: how we generate a single column migration in laravel 
Php :: SET DEFAULT hide title astra wordpress 
Php :: php get array key by value 
Php :: veue laravel remove #/ 
Php :: larave per page int returns string 
Php :: laravel download file from storage with progress bar 
Php :: Add laravel sail build as alias 
Php :: vault create/enable secret engine 
Php :: get post date and time in wordpress 
Php :: Drupal 9 loop term objects to retrieve term data (id, name, uuid) 
Php :: modifier un formulaire php 
Php :: php 5.6 xampp 
Php :: wp css deregister 
Php :: HTTP 500 ERROR WITHOUT MESSAGE PHP 
Php :: What is the method of querying from two tables with a condition in Laravel 
Php :: Argument 1 passed to DoctrineInflectorInflector::singularize() must be of the type string, null given, 
Php :: remove public path from url laravel 
Php :: vriadic function in php 
Php :: PHP strncasecmp — Binary safe case-insensitive string comparison of the first n characters 
Php :: set additional params to form laravel 
Php :: laravel Error: Unsupported operand types: IlluminateDatabaseEloquentCollection - int 
Php :: codeigniter 4 base_url 
Php :: laravel-filemanager not working 
Php :: $var = 1 / 2; in php 
Php :: multidimensional session-array 
Php :: laravel components scripts 
Php :: prestashop category as homepage 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =