error in include statment
<?php
//if user hit sumbit
//check if field are not empty
if(isset($_POST["username"]) && isset($_POST["password"]))
{
$manager = preg_replace(#[^A-Za-z0-9#i',",$_SESSION["username"]]);
$password = preg_replace(#[^A-Za-z0-9#i',",$_SESSION["password"]]);
include "../storescript/connect_to_mysql.php";
$sql = mysql_query("SELECT id FROM admin WHERE username='$manger' AND password='$password' LIMIT 1");
//make sure person exists in database---
$existCount = mysql_num_rows($sql); //count the row num
if($existCount == 1) //make sure name is only one in database
{
while($row = mysql_fetch_array($sql))
{
$id = $row["id"];
}
}....?>
Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\E-COMMERCE\admin\admin_login.php on line 20
line 20 is include "../storescript/co.....";
hwoarang69
Posting Pro
569 posts since Feb 2012
Reputation Points: 6
Solved Threads: 0
Skill Endorsements: 8
$manager = preg_replace(#[^A-Za-z0-9#i',",$_SESSION["username"]]); // Single Quotes are closed but not opened. CHECK!
$password = preg_replace(#[^A-Za-z0-9#i',",$_SESSION["password"]]);// Same thing as per previous line. Single Quotes Closed but not Opened
SagarSe7en
Junior Poster
141 posts since Jul 2011
Reputation Points: 10
Solved Threads: 4
Skill Endorsements: 0
hwoarang69
Posting Pro
569 posts since Feb 2012
Reputation Points: 6
Solved Threads: 0
Skill Endorsements: 8
Question Answered as of 7 Months Ago by
SagarSe7en