1,105,399 Community Members

error in include statment

Member Avatar
hwoarang69
Posting Pro
572 posts since Feb 2012
Reputation Points: -4 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 9 [?]
 
0
 
<?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.....";

Member Avatar
SagarSe7en
Junior Poster
143 posts since Jul 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 4 [?]
Skill Endorsements: 0 [?]
 
1
 

$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

Member Avatar
hwoarang69
Posting Pro
572 posts since Feb 2012
Reputation Points: -4 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 9 [?]
 
0
 

got it thanks

Question Answered as of 1 Year Ago by SagarSe7en
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article