Jump to content

driving me nuts! simple parse error!


Rifts

Recommended Posts

i have this code

<?php
require_once('dbconnect.php')

$user = "test";
$pass = "test";

$result=mysql_query("SELECT * FROM accounts WHERE user = '$user' AND pass = '$pass' ");

if(mysql_num_rows($result) == 0) {
	$login = "&err=Login Failed.";
	echo($login);
} else {
	$row = mysql_fetch_array($result);
	$user = $row['user'];
	$pass = $row['pass'];
	$login = "&user=".$user."&pass=".$pass."&err=Login Successful.";
	echo($login);
}

?>

 

and im getting this

Parse error: parse error in C:\wamp\www\flashstuff\WTF.php on line 4

 

line 4 is:

$user = "test";

 

all the dbconnect stuff is fine

 

 

help!

 

Link to comment
https://forums.phpfreaks.com/topic/212141-driving-me-nuts-simple-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.