Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve information from URL string 1

Status
Not open for further replies.

CassidyHunt

IS-IT--Management
Jan 7, 2004
688
US
I know in ASP or ASP.Net you can get variables from the url by using Request.Querystring("VariableName").

Right now I am trying to check if a variable exists in the URL and if it does make a decision on that for what to show.

Currently I have this setup:

Code:
if(is_null($_GET['u']))
{
//Do this
}
else
{
//Do this
}

When the page appears and u variable is not present I get an indexing error. I do not want use a form or post method. I would like to be able to just place it in a hyperlink and test for it.

Any help would be greatly appreciated.

Cassidy
 
You want to use
Code:
if (isset($_GET['x']))
to check for existence.

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top