Page 1 of 1

error

Posted: Sat May 03, 2014 2:13 am
by gilsontomy

Code: Select all

<?php
session_start(); 
if (isset($_POST['submit'])) {
 	$username=$_POST['user'];
 	if($username==="gilson"){ 
 		$_SESSION['user']=$username;
	header("Location: ab.php")
 	}
 }
?>

it shows an error "Parse error: syntax error, unexpected '}' in C:\xampp\htdocs\session1.php on line 8"

Re: error

Posted: Sat May 03, 2014 3:34 am
by requinix
Yup. Because the line above it is missing a semicolon.