Hi all. i am making 2 diffrent calles to a php script and inside that php script i use if statment to do diffrent things. Unfortently the way i coded the if statment the second else if statment never get executed. It always get ignore and first else if get excuted instead!!
I want for each diffrent calls ONLY one of else if statments get excuted. could any one tell me what i am doing wrong here.Thanks
First type of call for first else if:
Second type of call for second else if:
script.php
I want for each diffrent calls ONLY one of else if statments get excuted. could any one tell me what i am doing wrong here.Thanks
First type of call for first else if:
Code:
[URL unfurl="true"]http://localhost/script.php?cmd=file&file=visitorWantsToChat&site=20202020&channel=web&d=1177857195924&referrer=%28engage%29%20http%3A//localhost/1.html[/URL]
Code:
[URL unfurl="true"]http://localhost/script.php?cmd=file&file=visitorWantsToChat&Pushed=true&site=20202020&channel=web&d=1177857103511&referrer=http%3A//localhost/1.html[/URL]
script.php
Code:
<?
$cmd = $_GET['cmd'];
$file = $_GET['file'];
$Pushed = $_GET['Pushed'];
if ($cmd=="dive")
{
// do this1
}
else if ($cmd=="file" && $file=="visitorWantsToChat")
{
//do this2
}
else if ($cmd=="file" && $file=="visitorWantsToChat" && $Pushed=="true")
{
//do this3
}
?>