Log in

View Full Version : refering page code


Mickie D
12-23-2005, 08:54 PM
can i make $choice become something else if a certain page has passed the data to it ?

i.e


if (page referer = "profile.php";)
{
$choice = "whatever";
}


i know the above statement does not exist i have looked over the php manual but cannot find a statement for this command ... hopefully someone can shed some light

thanks in advance

Regards
Mickie D

i found this out on my travels and searching




if ($_SERVER["HTTP_REFERER"] == 'showthread.php')
{

$choice = "si";

} else {

$choice ="query";

}



if i change showthread.php to the full showthread.php?t=63196 then it will work but i would like it to work from any thread, so is there a operator that will allow me to say for example

if the referer contains showthread.php it will allow my variables to be changed instead of needing the exact thread id involved

thanks very much

its alright ill just work it all out myself lmao

this fooking automergeing is just pure bollox aswell!

anyway if someone else wants some help with somethng simular here is the answer from me to you!


if (strstr($_SERVER["HTTP_REFERER"],'showthread.php'))
{
$choice = "si";
}


that will search out the showthread.php in the whole string and send it back to us as a true answer and change the variable for use

Regards
Mickie D