PDA

View Full Version : [PHP] IF THEN statements



Lapras
January 9th, 2004, 21:46
I am a novice when it comes to PHP could anyone tell me how to do the equivalent of this logic.
If the data for a the cookie I assigned earlier = examplevar
THEN
include("example.htm")

spec
January 9th, 2004, 22:34
please look at the manual before asking questions

http://ca3.php.net/manual/en/control-structures.php#control-structures.if

Chroder
January 10th, 2004, 21:40
Something like


if($_COOKIE['cookiename'] == $myvar)
{
include('mypage.php');
}