$go?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jackbk
Forum Newbie
Posts: 2
Joined: Wed Jul 24, 2002 9:01 am

$go?

Post by jackbk »

Hi all,

I am rather new at PHP, and have a question, you experts probably can answer in no time... :D

I have this function that returns an <A HREF> for a number of items, like this:

Code: Select all

<a href="$PHP_SELF?go=**the action to take next**">Visible text</a>
I found a script somewhere doing something similar I want to do here, so that's where this snippit is coming from.

In my php script I have something like:

Code: Select all

if ($go == "**action 1**") &#123; 
  // Do the first action 
&#125; 
elseif ($go == "**action 2**") &#123;
  // Do the second action
&#125;
etc.

But now the problem: no matter what I try, the $go is never assigned... The <A HREF>'s look okay when I browse the page, but when I click the link nothing happens... It seems the parameters on the URL do not get parsed?

Here's is my config: Windows2000, PHP 4.2.1, Apache 1.3.22

Could someone point put the problem? Thanks in advance!

Jack
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

click here
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

It's a sticky for a reason...

Mac
jackbk
Forum Newbie
Posts: 2
Joined: Wed Jul 24, 2002 9:01 am

Post by jackbk »

Thanks for the quick respons... Sorry if this was a faq... I am not only new to PHP but also to this forum, and I have not read all "house rules" and faq documents yet...

Thanks again - with the details provided in the "Sticky", the problem seems to be fixed... :)

Regards,

Jack
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

nah problem dude
Post Reply