i get this error
this is reg.php
<?php
$host = "localhost";
$username = "root";
$password = "";
$db_name ="alivecsetup";
$tbl_name ="members";
@mysql_connect($host, $username, $password) or die ("Can't Connect");
@mysql_select_db($db_name) or die(mysql_error());
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
$username = stripslashes($username);
$email = stripslashes($email);
if((!$username) || (!$password) || (!$email)){
echo '<h3>All fields are required!</h3>';
include 'register.html';
exit();
}
$db_password = md5($password);
$sql = mysql_query("INSERT INTO $table_name (email, username, password)
VALUES('$email', '$username', '$db_password', now())")
or die (mysql_error());
if(!$sql)
echo "There was an error while creating you account. Please contact an admin.";
else
{
$userid = mysql_insert_id();
//mailing time
$subject = "Membership at my-website.com";
$message = "Dear $username,
Thank you for registering at our website,
Here is your login information:
Username: $username
Password: $password
Thanks!
The Webmaster
This is an automated response, please do not reply!";
mail($email, $subject, $message, "From: E-Nuke Webmaster<admin@e-nuke.net>\n X-Mailer: PHP/" . phpversion());
echo "<meta http-equiv=\"Refresh\" content=\"0; URL=http://friiks.awardspace.com/register.htm\"/>You will be redirected to login page."; } ?>
i don't know if you need this but..
<html>
<head>
<title>Register</title>
</head>
<body>
<form action='reg.php' method="post" name="loginform" id="loginform">
<table>
<tr>
<td>Username:</td><td><input type="username" name="username" class='text'></td>
</tr>
<tr>
<td>Password:</td><td><input type="password" name="password" class='text'>
</td>
</tr>
<tr>
<td>E-mail:</td><td><input type="email" name="email" class='text'>
</td>
</tr>
<tr><td><input type="submit" name="Submit" class='button' value="Register"></td>
</tr>
</table>
</form>
</body>
</html>
now i know
i should add { and } but when i do i get this error thank you for helping i hope you can figure this out i cant.