today i want to know how to pass global variable between many pages
assume we have page (1.php) have global and i want to print the value of this variable in page (2.php)
am using this sample code
//page one name x.php
<?
function insert($x){
global $userid ;
$userid=$x;
}
?>
//page two name 1.php
<?php
include("x.php");
insert("45454545454545");
echo "<a href=\"2.php\">go</a>";
?>
//page three name 2.php
<?
include("x.php");
echo $userid ;
?>
it not working


Sign In
Create Account


Back to top









