Thanks for the advice... The link worked.... Now it is saying this:

Notice: Undefined index: action in....

It only says this if there is no action...it goes away once I click the link
and the action=someaction.... Is there a way to fix my php so that I dont
have to change all of the web sites hosted on my server?? Thanks!

Ryan

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
Hows it goin?? Im pretty new to this, so I have a pretty simple
question. I am running an apache server with php 4 on a win 2k machine.
When I try to do something like this: <?

echo "<a href=\"index.php?action=someaction\">Some Action</a>";

if ($action == "someaction") {
echo "Anything";
}
?>

It says: Notice: Undefined variable: action in .....

Ive built plenny of pages with simple things like that, and they all
work...is it a problem with my apache server??? Thanks in advance
[/snip]

You probably updated PHP recently and register_globals is now 'off'. Try

if($_GET['action'] == "someaction"){
     do foo
}

HTH!

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to