Jump to content

[SOLVED] Parse Error?


elite_prodigy

Recommended Posts

I can't figure out why i'm getting

Parse error: syntax error, unexpected '[' in /home/exembar/public_html/team/php/login.php on line 23

 

I haven't missed any semicolons or anything, I am soo lost here.

 

This is the code throwing the error:

<?php
include 'config.php';

mysql_select_db("exembar_site")or die("Cannot find specified Database!");

$user=$_POST['user']; 
$pass=$_POST['pass']; 

$user= stripslashes($myusername);
$pass= stripslashes($mypassword);
$user= mysql_real_escape_string($myusername);
$pass= mysql_real_escape_string($mypassword);

$sql="SELECT * FROM `staff` WHERE `username`='$user' AND `password`='$pass'";
$result=mysql_query($sql);

$count=mysql_num_rows($result);

if($count==1){

while($info = mysql_fetch_array($result)){

  $id = info['id'];
  $user = info['username'];

  session_start();

  $_SESSION['id'] = $id;
  $_SESSION['user'] = $user;

}
header("location:http://team.exembarstudios.exofire.net");
}

else {

session_start();
$_SESSION['error'] = "Invalid Username or Password";

}
?>

 

 

all help is appreciated.

 

Link to comment
https://forums.phpfreaks.com/topic/135052-solved-parse-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.