misslois74
Programmer
i have php scripts which is running just fine in WAMP but my client is using MAMP when i tried executing its not redirecting to the correct page i cant really figure out what is the problem here is my sample code:
im using this URL: whenever im running the page after loggin in the page is blank and all I can see is just the text LOG IN, it seems that its not really redirecting what could be the problem with these.....
Code:
include "connection_dbase_settings.php";
$user_name = $_POST[user];
$pass_word = $_POST[pass];
$quer = "Select * from tbl_users where username='$user_name' and password='$pass_word'";
$result1 = mysql_query($quer);
$row = mysql_fetch_array($result1);
$user_id = $row[userid];
$level = $row[user_level];
$user_area = $row[area];
$user_fullname = $row[name];
$center = $row[center_name];
$num = mysql_num_rows($result1);
if(($num != 0) && ($level == 'Coordinator'))
{
session_start();
$_SESSION['id']=$row[userid];
$_SESSION['ucentername']=$center;
$_SESSION['uarea']=$user_area;
$_SESSION['ufullname']=$user_fullname;
header("Location: [URL unfurl="true"]http://localhost/Feeding/menu_guest.php");[/URL]
}
elseif(($num != 0) && ($level == 'Administrator'))
{
session_start();
$_SESSION['id']=$row[userid];
$_SESSION['ucentername']=$center;
$_SESSION['uarea']=$user_area;
$_SESSION['ufullname']=$user_fullname;
header("Location: [URL unfurl="true"]http://localhost/Feeding/menu_admin.php");[/URL]
}
else
{
header("Location: [URL unfurl="true"]http://localhost/Feeding/error_login.php");[/URL]
}
im using this URL: whenever im running the page after loggin in the page is blank and all I can see is just the text LOG IN, it seems that its not really redirecting what could be the problem with these.....