Re: Sending a variable
- From: Rik <luiheidsgoeroe@xxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 18:26:00 +0100
Captain Paralytic <paul_lautman@xxxxxxxxx> wrote:
On 31 Jan, 16:58, Gunnar G <deb...@xxxxxxxxx> wrote:In foo.php I do (essentialy)
header("Location:http://x.y.z/bar.php?".a000=1&Vtmpfname=".$Vtmpfname;
where $Vtmpfname has a proper value, atleast I can see it if I echo it in
foo.php.
But in bar.php, I don't get any value for a000 or Vtmpfname.
I thought I would get those variables.
You missed the closing bracket on the header call.
That's not the only thing he missed.
Let's break it down:
"Location:http://x.y.z/bar.php?" -> string
.. -> concatenate
a000 -> defined constant ?
= -> assignment operator
1 -> integer
& -> bitwise AND
Vtmpfname -> defined constan ?
= -> assignment
".$Vtmpfname; -> unclosed string.
I'd definetely say this cannot be the real code :-).
Now, anough teasing, let's help the OP:
$a000 & $Vtempfname will only be available in bar.php if register_globals is enabled. This would not be a wise choice. To access the variables use $_GET['a000'] & $_GET['Vtempfname'].
--
Rik Wasmus
.
- Follow-Ups:
- Re: Sending a variable
- From: Gunnar G
- Re: Sending a variable
- References:
- Sending a variable
- From: Gunnar G
- Re: Sending a variable
- From: Captain Paralytic
- Sending a variable
- Prev by Date: Re: Sending a variable
- Next by Date: Re: Weird Permissions Problem With Includes
- Previous by thread: Re: Sending a variable
- Next by thread: Re: Sending a variable
- Index(es):
Relevant Pages
|