Try to search your question here, if you can't find : Ask Any Question Now ?

Parse error: syntax error, unexpected '"', expecting ')' in G:xampphtdocsLibrarystudentregistration.php on line 164

HomeCategory: stackoverflowParse error: syntax error, unexpected '"', expecting ')' in G:xampphtdocsLibrarystudentregistration.php on line 164
sourav asked 2 weeks ago

Can anyone help me to find out what the problem is? The error is

error::Parse error: syntax error, unexpected ‘”‘, expecting ‘)’ in G:xampphtdocsLibrarystudentregistration.php on line 164

if (isset($_POST['Submit'])) {
$count = 0;
$sql = "SELECT username from
student`”;
$res = mysqli_query($db, $sql);

while ($row = mysqli_fetch_assoc($res)) {
    if ($row['Student_ID'] == $_POST['Student_ID']) {
        $count = $count + 1;
    }
}
if ($count == 0) {
    mysqli_query($db"INSERT INTO STUDENT VALUES('$_POST[Name]', '$_POST[Student_ID]', '$_POST[Department]', '$_POST[Email]', '$_POST[Library code]', '$_POST[Password]')");
?>
    <script >
        alert("Registration successful");
    </script>
<?php
}
else
{

?>
    <script >
        alert("The username already exist.");
    </script>
    <?php

}

}`

1 Answers
Best Answer
Amit answered 2 weeks ago
Your Answer

8 + 12 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com