I just did it:
$Name = serialize($Name);
$Name = ereg_replace("\"", "'", $Name);
<form>
<input type=hidden name=Name value=$Name>
<submit>
</form>
After submitting:
$Name = eregi_replace("'", "\"", $Name);
$Name = stripslashes($Name);
$Name = unserialize($Name);
Ok, this works, but there is mush better way, I'm sure. Can somebody tell
me?
Afan Pasalic
-----Original Message-----
From: afan [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 3:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] passing array with form
HI to all,
I have a little, simple form and after submitting, together with that
information I have to pass an array with other info. How?
Let's say array is called $Name
I tried this:
$Name2 = addslashes(serialize($Name));
On screen:
a:5:{i:0;s:13:\"Name 1\";i:1;s:6:\"Name 2\";i:2;s:10:\"Name
3\";i:3;s:11:\"Name 4\";i:4;s:12:\"Name 5\";}
And after submitting:
On screen:
a:9:{i:0;s:13: - part after quotes is cutted off!
After:
$Name = unserialize(stripslashes($Name2));
no results!
Any idea how to fix this?
Thanks!
Afan Pasalic
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]