0

This is my connection page

<?php 
$servername ='localhost';
$username ='root';
$password ='';
$dbname ='credit_list';

$conn = mysqli_connect($servername,$username,$password) or die(mysqli_error());
$dbconnect = mysqli_select_db($conn,$dbname);

?>

and this is my home page

<?php
include "includes/connect_database.php"; 
if(empty($_SESSION)) // if the session not yet started
session_start(); 
if(!isset($_SESSION['username'])) { //if not yet logged in
header("Location:index.php");// send to login page
exit;
}
?>
//codes below are the contents of the home page 

And the problem my server show this error

Parse error: syntax error, unexpected ';' (T_STRING) in C:\wamp\www\credits\home.php on line 2

how can I fix this?

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • 1
    Possible duplicate of [PHP Parse/Syntax Errors; and How to solve them?](http://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) – Rizier123 Apr 25 '16 at 15:59
  • Unfortunately, your linked question doesn't covers Kenneth's problem, but it seems Muhhamad already have the right answer. – Gergely Lukacsy Apr 25 '16 at 16:04

1 Answers1

1

Lol its just because you are using Greek question mark instead of Semi-colon , Just replace greek-question marks with semi-colons they both look same ";" (Here is Greek Question mark) ";" (And here is semi-color)