PHP $REQUEST[] problem
Posted by: furtivefox (---.cable.mindspring.com)
Date: March 09, 2008 12:16AM

I recently downloaded WAMP again, to start working on my web development again. I downloaded it before and after realizing I had to use local host everything was good and I could run my PHP code fine.

Now with the newest WAMP I can't get my PHP to work. Everything looks fine, and almost everything works, except for $REQUEST[], $GET[], or $POST[].

It must be something I need to setup in Apache or PHP. It's driving me nuts.

Here's what I'm doing:

<a href="index.php?link=downloads"><img></a>

if ( !isset( $REQUEST['link'] ) )
$link = main;
else
$link = $REQUEST['link'];

switch ( $link )
{}

I'm always getting $link == main.

Of course I left out alot of code.. but that is not important.
I see the ?link=downloads in the address bar, yet PHP thinks noting is received.

Any help would be greatly appreciated.

Options: ReplyQuote
Re: PHP $REQUEST[] problem
Posted by: toivo (---.nsw.bigpond.net.au)
Date: March 09, 2008 12:50AM

Hi,

The predefined variables are actually $_REQUEST, $_GET and $_POST. Try $_REQUEST and you should receive the value.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: PHP $REQUEST[] problem
Posted by: furtivefox (---.cable.mindspring.com)
Date: March 09, 2008 01:55AM

Wow..... I can't believe that's all it was.... lol

Thanks a lot.

Options: ReplyQuote


Sorry, only registered users may post in this forum.