Page 1 of 1
getting information from the url.
Posted: Fri May 23, 2003 3:27 am
by RedRasper
Hi, is it possible to get information from url, for example
http://www.xxx.com/test.php?firstchoice ... hoice=xxxx ?
I've had a scout of the manual, but haven't found it, so if someone can point me in that direction or tell I would be greatful.
Thanks
RedRasper
Posted: Fri May 23, 2003 3:37 am
by Wayne
if that is the URL that is calling the page, then all of the details after the ? will be available in $_GET variables with the & starting the beginning of the next variable. The URL will produce the following variables :
$_GET["firstchoice"] will = xxxx
$_GET["secondchoice"] will = xxxx
Hope thats what you were looking for?
Posted: Fri May 23, 2003 3:51 am
by RedRasper
Hi,
Yeah thats what I'm after. Just a check, can I just enter that as a url in say a web broswer and still get at that information?
Cheers
RedRasper
Posted: Fri May 23, 2003 4:45 am
by mikusan
Of course if you are ahead of yourself and are thinking, "well doesn't that make my site grossly insecure" yes it does! ys the quick answer. BUT may i suggest you look into sessions, sessions validate if a user is indeed allowed to view the content, if not he will not be able to see the content even if he types it in the url of the browser.
Posted: Fri May 23, 2003 4:58 am
by RedRasper
Hi,
Thanks for the information, I'll look into the security side of things!
RedRasper