Forum Moderators: coopster

Message Too Old, No Replies

Parse error unexpected T_VARIABLE

Parse Error unexpected T_VARIABLE

         

kmblackbear06

12:03 am on Apr 8, 2006 (gmt 0)



Hey everyone. I am working on a project for school and am getting a stupid parse error unexpected T_VARIABLE and can't get it to work...

<?php

$chk_id = $_REQUEST["User"];
$chk_pass = $_REQUEST["Pass"];
$move_on = Chkpass()

$connection = mysql_connect("localhost","mitchellk","mitchell06")
or die ("Invalid Username or Password, Please try again");

$db = mysql_select_db("mitchellk" , $connection)
or die ("Invalid Username or Password, Please try again");

$sql = "SELECT PASSWORD FROM 'tbl_People' WHERE PASSWORD = '$chk_id' ";
$result = mysql_query($sql)
or die("Password Failed");
$okid = mysql_fetch_row($result);

$sql = "SELECT USERNAME FROM 'tbl_People' WHERE USERNAME = '$chk_pass' ";
$result = mysql_query($sql)
or die("Username Failed");
$okid = mysql_fetch_row($result);

if (($chk_id <> $okpass[0]) or ($chk_pass <> $okid[0})) {
die ("YOU ARE NOT AUTHORIZED");
}

?>

It says I am getting the error on line 6 which is the following line.

$connection = mysql_connect("localhost","mitchellk","mitchell06")
or die ("Invalid Username or Password, Please try again");

FalseDawn

12:36 am on Apr 8, 2006 (gmt 0)

10+ Year Member



Several of your lines are missing the terminating semicolon.

nfs2

12:54 am on Apr 8, 2006 (gmt 0)

10+ Year Member



It only appears many lines are missing the semi colon

For example

$result = mysql_query($sql) //none needed here
or die("Password Failed"); //because it ends here

But to reply to the origional poster

Replace $move_on = Chkpass()

with $move_on = Chkpass();