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

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

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");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.