Search
 
SCRIPT & CODE EXAMPLE
 

PHP

send value from one page to another in php

//On page 1
$_SESSION['varname'] = $var_value;

//On page 2
$var_value = $_SESSION['varname'];
Comment

how to send data from one website to another in php

$url="http://abc/api/xyz.php";  //url of 2nd website where data is to be send
$postdata = $data
$ch = curl_init(); 
curl_setopt ($ch, CURLOPT_URL, $url); 
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0)
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); 
curl_setopt ($ch, CURLOPT_POST, 1); 
curl_setopt ($ch, CURLOPT_TIMEOUT, 60); 
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_HTTPHEADER, array('Content-Type', 'application/json'));
$result = curl_exec ($ch); 

echo $result;  
curl_close($ch);
Comment

php send data from one page to another

session_start();
Comment

PREVIOUS NEXT
Code Example
Php :: modal form with php 
Php :: scheduling in laravel in custom cron 
Php :: php string filter email 
Php :: how to create a tryit editor 
Php :: php get current date 
Php :: update php version cpanel 
Php :: how to change the colum type in migration laravel 
Php :: laravel except route 
Php :: php sql insert into if not exists 
Php :: random number php 
Php :: what does = mean in php 
Php :: calculate 1 day interest 
Php :: crrate model in laravel 
Php :: php artisan migrate error 
Php :: convert string to int php 7 
Java :: androidx recyclerview dependency 
Java :: list java versions mac 
Java :: spigot cancel repeating task 
Java :: javafx get screen size 
Java :: java stream find specific element 
Java :: WRITE_EXTERNAL_STORAGE no longer provides write access when targeting Android 10+ 
Java :: change port in spring boot 
Java :: android java remove imageview source 
Java :: android start service on boot 
Java :: java random max and min 
Java :: reduce opacity of image in imageview in android 
Java :: how to check type of primitive value in java 
Java :: unit test java intellij 
Java :: how to randomize an array java 
Java :: android studio linearlayout set margin 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =