Page 1 of 1

Determine if url has variables contained

Posted: Mon Mar 31, 2003 7:56 pm
by john_crawford32
Hi all, is there a search function on this list?
I am sure this is an easy one but not for me.
I have an index page that the first time visited has no url variables (coldfusion term) but after selecting a nav link it has them ie.
first time http://www.mydomain.com
second http://www.mydomain.com?content=calendar

I am trying to determine if content is set or not using the following code

Code: Select all

if (isset($HTTP_GET_VARSїcontent]))
{
$contentpage = $HTTP_GET_VARSїcontent].".php";
if ($contentpage == "sub.php")
{
$contentpage = "subscriptions.htm";
}
}
else
{
$contentpage = "start.php";
}
I get an error
Notice: Use of undefined constant content
How do I determine if the content variable exists or not?
Thanks
John

Posted: Mon Mar 31, 2003 8:26 pm
by john_crawford32
Pebkac,
I forgot the quotes yes i am a newbie.

Code: Select all

if (isset($HTTP_GET_VARSї'content']))

Posted: Tue Apr 01, 2003 12:03 am
by protokol
At least you were able to solve the problem ;-)

You are well on your way young grasshopper.

Posted: Tue Apr 01, 2003 2:27 am
by twigletmac
As for the search function, it's here:
search.php

(there's a link to it amongst the links above the ImHosted banner)

Mac