0

I'm getting the follow error in the code below: (Parse error: syntax error, unexpected end of file, expecting '`' in).

<?php
    include_once 'connect.php';
    include_once 'functions.php';

    sec_session_start(); // Our custom secure way of starting a PHP session.

    if (isset($_POST['email'], $_POST['p'])) {
        $email = $_POST['email'];
        $password = $_POST['p']; // The hashed password.
        if (login($email, $password, $mysqli) == true) {
            // Login success 
            header('Location: ../protected_page.php');
    `   //echo 'Login Successful';
        } 
        else {
            // Login failed 
            header('Location: ../loginpage.php?error=1');
        //echo "Login Unsuccessful";
        }
    } 
    else {
        // The correct POST variables were not sent to this page. 
        echo "Invalid Request";
    } ?>

2 Answers2

0

You missing closing curly brace for

if (login($email, $password, $mysqli) == true) {

also missing closing curly brace for parent if condition

if (isset($_POST['email'], $_POST['p'])) {
Perdeep Singh
  • 517
  • 4
  • 7
0

Maybe 'connect.php' or 'functions.php' file will be include '`' character. Please investigate these files.

Andy Ryu
  • 79
  • 2