I have a file login.php
<?php
session_start();
include_once "../lib/opendb.php";
include_once "products_make.php";
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$email= $_GET['email'];
$pswd= $_GET['pswd'];
if ($email=="admin") {
$arr['id']=0;
$arr['judge_name']="Administrator";
$_SESSION['gVars']=$arr;
if ( $pswd == "2755") {
$arr['status']="admin";
}
else {
$arr['status']="error";
}
}
else {
$db= connect_db();
$sql= "SELECT id,judge_name,category_code,cellphone FROM judges WHERE email='$email'";
// $db= connect_db();
$rs = mysql_query( $sql);
if (mysql_num_rows($rs) >0 ) {
$arr= mysql_fetch_assoc($rs) ;
// test the pin
$pin = substr($arr['cellphone'],-4);
if ($pin==$pswd) {
$_SESSION['gVars']=$arr;
$arr['status']="success";
// check, if the scoreboard ready for this judge
test_scoringboard($arr['category_code'], $arr['id']) ;
echo "<a href='a/menu.php'></a>";
}
else {
$arr['status']="error";
}
}
else {
$arr['status']="error";
}
}
print json_encode($arr);
close_db($db);
?>
and i want to show the other file (red:menu.php)
but when I am login and the username and password are true, the page don't show menu.php, but "undefined". So what's the solution. Please help me. Thank you.