Maybe someone can help me with a small problem.
In perl you are able to say something to the effect of:
Code:
} elsif ($ENV{'QUERY_STRING'} =~ /admin/i) { &admin;
}
to see if part of the query string contains "admin" in the string, if it does, goto sub admin.
Well in php I want to do the same thing.
The code I'm currently using is similar to:
Code:
elseif ($_SERVER['QUERY_STRING'] == "validate"){ConfirmEmail();}
which works fine if the url is
http://mysite/index.php?validate
but in reality, that will never be the url, anything hitting that url will be more like
http://mysite/index.php?validate=ksjdfjhsdfjkhsjkfh
and when I use that URL it doesn't catch it and just sends it to the default function because at the bottom of the elseifs is:
I realize that its because I have "==" in the statement, but is there a function similar to the perl "=~" so that I can just see if the query string contains "validate" instead of people exactly "validate"
Any help would be greatly appreciated.