error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gilsontomy
Forum Newbie
Posts: 1
Joined: Sat May 03, 2014 2:09 am

error

Post 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"
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: error

Post by requinix »

Yup. Because the line above it is missing a semicolon.
Post Reply