Hello There,
I'm trying to pass the contents of a comment form through the URL as easily as possible. I was reading about serialize and unserialize. It kind of works but kind of doesnt. It seems to pass all my data through the url fine, but when it comes out of the otherside, I don't get my data back, I just get 'bool(false)' when I do a var dump!
Hope you can help
JB
I'm trying to pass the contents of a comment form through the URL as easily as possible. I was reading about serialize and unserialize. It kind of works but kind of doesnt. It seems to pass all my data through the url fine, but when it comes out of the otherside, I don't get my data back, I just get 'bool(false)' when I do a var dump!
Hope you can help
JB
Code:
// Page 1
// $safe is an array
$serial = serialize($safe);
header ("Location: debate.php?id=".$safe["id"]."&side=".$safe["side"]."&mode=cfailed&serial=".$serial."#commentform");
Code:
// Page 2
$data = $_REQUEST['serial'];
$data = unserialize($data);
var_dump($data);