<?php
$type = $_REQUEST["type"];
if($type=="login"){
$username= $_REQUEST["un"];
$pw= $_REQUEST["pw"];
if($username=="v" && $pw=="v"){
echo "4";
}
else{
echo "0";
}
}
else if($type=="getcategorylist"){
echo "Clothes,Electronics,Food";
}
else if($type=="getproductlist"){
$catname = $_REQUEST["catname"];
if($catname == "Clothes"){
echo "Tshirt,Jeans,Shirt";
}
if($catname == "Electronics"){
echo "TV,Mobile,Laptop";
}
if($catname == "Food"){
echo "Burger,Pizza,Noodles";
}
}
else if($type=="getmyprofile"){
}
else if($type=="getproductdetails"){
}
?>
$type = $_REQUEST["type"];
if($type=="login"){
$username= $_REQUEST["un"];
$pw= $_REQUEST["pw"];
if($username=="v" && $pw=="v"){
echo "4";
}
else{
echo "0";
}
}
else if($type=="getcategorylist"){
echo "Clothes,Electronics,Food";
}
else if($type=="getproductlist"){
$catname = $_REQUEST["catname"];
if($catname == "Clothes"){
echo "Tshirt,Jeans,Shirt";
}
if($catname == "Electronics"){
echo "TV,Mobile,Laptop";
}
if($catname == "Food"){
echo "Burger,Pizza,Noodles";
}
}
else if($type=="getmyprofile"){
}
else if($type=="getproductdetails"){
}
?>
No comments:
Post a Comment