0

I am very new to the world of PHP and MYSQL programming and have run into a roadblock. I am trying to program an admin area of a site i am working on and am coming up with the following error when the page is loaded

Parse error: syntax error, unexpected T_VARIABLE in /home/content/v/i/r/virtua124/html/sites/cart/admin/index.php on line 19

Here is the code as written

<?php

session_start();
if(!isset($_SESSION["manager"])){
	header("location: admin_login.php");
	exit();
}

$managerID=($SESSION["id"]);
$manager=($SESSION["manager"]);
$password=($SESSION["password"]);

include"../storescripts/connect_to_mysql.php";

$sql=mysql_query("SELECT * FROM admin WHERE id='$managerID' AND username='$manager' AND password='$password' LIMIT 1") 

$count = mysql_num_rows($sql); 
if($count==0) {
	echo "Your login Data is not in our database. Plese sign in or try again.";
	exit();
}
?>

I mainly get the error when clicking the admin link at the bottom of my main page which is http://riverbaymedia.com/sites/cart/

This problem is bothering me b/c i cant seen to get past it. Any help would be very welcomed


Tim

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by karteek.vemula
0

On line 15 of the code you posted, you forgot a semicolon at the end of the line.

0

Hi,
there may be error in the following code:

$managerID=($SESSION["id"]);
$manager=($SESSION["manager"]);
$password=($SESSION["password"]);

Replace above three line instead of below three lines

$managerID=($_SESSION["id"]);
$manager=($_SESSION["manager"]);
$password=($_SESSION["password"]);

-----

$sql=mysql_query("SELECT * FROM admin WHERE id='$managerID' AND username='$manager' AND password='$password' LIMIT 1");
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.