1.11M Members

error in include statment

 
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.....";

 
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

 
0
 

got it thanks

Question Answered as of 1 Year Ago by SagarSe7en
Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article