hey there im hoping that someone can help me in solving this problem i keep on getting this error when i try to connect from register.html to register.php.
Here is my code!
<?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());
$firstname = $_POST['firstname'];
$lastname = $_POST[‘lastname’];
$address= $_POST[‘address’];
$username = $_POST['username'];
$password = md5($_POST['password']);
$confirmpassword = md5($_POST['confirmpassword']);
$email = $_POST['email'];
$checksignin = mysql_query("SELECT username FROM signin WHERE username='$username'");
$username_exist = mysql_num_rows($checkuser);
if($username_exist > 0){
echo "I'm sorry but the username you specified has already been taken. Please pick another one.";
unset($username);
include 'register.html';
exit();
}
$query = "INSERT INTO signin (firstname, lastname, address, username, password, confirmpassword, email)
VALUES('$firstname',’$lastname’, ‘$address’, '$username', ‘$password’, ‘$confirmpassword’, '$email',)";
mysql_query($query) or die(mysql_error());
mysql_close();
echo "You have successfully Registered";
$yoursite = ‘[url]www.sitename.co.za’;[/url]
$webmaster = ‘Siphokazi’;
$youremail = ‘ewew@webmail.co.za’;
$subject = "You have successfully registered at $yoursite...";
$message = "Dear $name, you are now registered at our web site.
To login, simply go to our web page and enter in the following details in the login form:
Username: $username
Password: $password
Please print this information out and store it for future reference.
Thanks,
$webmaster";
mail($email, $subject, $message, "From: $yoursite <$youremail>\nX-Mailer:PHP/" . phpversion());
echo "Your information has been mailed to your email address.";
?>
Thanks in advance for the help!!!