Saving Variables in PHP
Posted: Sun Jul 10, 2011 7:08 am
Hi again guys. you have helped me out a lot last time.
Thank for that.
can you advise how to save variables in PHP file?
lets say i have a function that i pass a value to,
When i run this in browser, it returns 2, as it should.
But how do i go about saving this 2, so next time i run it it will return 3, 4, 5...
so it saves the variable.
I just want to be able to save a simple variable in my PHP file.
Then retrieve it.
Thank for that.
can you advise how to save variables in PHP file?
lets say i have a function that i pass a value to,
Code: Select all
<?php
$num = 1;
$qbClientString = isset($_GET['ClientString']) ? $_GET['ClientString'] : '';
$num++;
writeName($num);
function writeName($String) {
print($String);
}
?>But how do i go about saving this 2, so next time i run it it will return 3, 4, 5...
so it saves the variable.
I just want to be able to save a simple variable in my PHP file.
Then retrieve it.