I was wondering whether it's possible to set data into the POST array to be transferred between pages, without using a form?
I've just tried this on a blank test page...
Code: Select all
<?php
$_POST = array();
$_POSTї"test"] = "test data";
?>
<a href="test4.php">go</a><br />
<br />
<?php
echo($_POSTї"test"]);
?>Obviously you may as well just call your array something else to do this.
Then on the next page test4.php...
Code: Select all
<?php
print_r($_POST);
?>What I'd like to know is if there's a way to set the post data on one page, then access it on a subsequent page.
I guess it's down to how you switch to the next page - i'd like to be able to do this by just the user just clicking a link.
Just wondered if it is possible.
As I want to have data passed between pages, but I don't want to use the address bar $_GET data. And there will be quite a few variables I'll need to pass between pages, each with a large amount of data.
If it isn't possible then no problem - I'll just use sessions.
Is it possible though?
Thanks
Batfastad