Suppose I have got the value of a veriable from file1.php, in file2 .php
I want to increment this value and want to print the incremented value in file2.php
How can I do this job...............

<?php
session_start();
$_SESSION['var'] = $variable;
?>
<?php
session_start();
echo ++$_SESSION['var'];
?>

I guess that should work

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.