0

Hey everyone i seriously need your help, im a novice when it comes to PHP and MySQL. I'm developing a website using PHP and Mysql and i keep on getting this error(Parse error:syntax error, unexpected T_STRING in C:\ on line 38) when i'm trying to connect from signin.html to signin.php.What puzzles me is that there is no line 38. Please tell me what im doing wrong!

Here is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>signin in</title>
</head>
<body>
<?php //Database Information
$dbhost = "localhost";
$dbname = "musicwebsite";
$dbuser = "root";
$dbpass = "xxxx";
//Connect to database
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 signin where username=’$username’ and password=’$password’”;
$result = mysql_query($query);
if (mysql_num_rows($result) != 1) {
$error = “Bad Login”;

include “signin.html”;
} else {

$_SESSION[‘username’] = “$username”;

include “memberspage.php”;
}
?>
</body>
</html>

Edited by Reverend Jim: Fixed formatting

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.