T_STRING
Date: November 13, 2008 11:58AM
<?php
$dbhost = "localhost";
$dbname = "wyrleyjuniors";
$dbuser = "root";
$dbpass = "yourpass";
mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
mysql_select_db($dbname) or die(mysql_error());
session_start();
$username = $_POST[‘username’];
$password = md5($_POST[‘password’]);
$query = “select * from users where username=’$username’ & password=’$password’”;
$result = mysql_query($query);
if (mysql_num_rows($result) != 1) {
$error = “Bad Login”;
include “login.html”;
} else {
$_SESSION[‘username’] = “$username”;
include “memberspage.php”;
}
?>
PLEASE HELP!!!
I can successfully register new users and they do indeed go into and save on my database. However when I try and login I get the following message:
Parse error: syntax error, unexpected T_STRING in C:\wamp\www\login.php on line 19
Any Ideas?
Cheers Dan.
Bare in mind i'm a noobie