Re: Header() variables
| From: | Leif K-Brooks | Date: | Thu, 10 Apr 2003 09:36:43 +0000 |
| Subject: | Re: Header() variables | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143297@lists.php.net to get a copy of this message | ||
You should also urlencode() it, as in header("Location: target_file.php?myVar=".urlencode(serialize($myVar)));
Alex Ciurea wrote:
Thx alot, now I've fixed the problem: header("Location: target_file.php?myVar=".serialize($myVar)); In target_file I use $myVar=unserialize($myVar) to regain my variable. It works now. Again, thank you very much for your help. Alex ----- Original Message ----- From: "Erwin Kerk" <erwin@scoutingnederland.nl> To: "Alex Ciurea" <alex@netonwave.com> Sent: Thursday, April 10, 2003 12:13 PM Subject: Re: [PHP] Header() variables-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.Try the serialize() and unserialize() functions Erwin Alex Ciurea wrote:"Array".Hello, I try to send some variables using the header() function. My code is: header("Location: target_file.php?myVar=".$myVar); It works fine with all types of variables, but not with arrays. If $myVar is an array, the header function will transmit the valuethisProbably it's normal but is there any way to transmit an array usingfunction ?? Thanks alot Alex