Thread: Unexpected $
View Single Post
Old 06-04-2006, 02:26 PM   #1 (permalink)
lukeburns
Luke
 
Join Date: Jun 2006
Posts: 1
lukeburns is on a distinguished road
Unexpected $

Parse error: parse error, unexpected '}' in /home/[removed]/public_html/register.php on line 86

????

Ive been staring for ever... help me out please.

heres the code:
PHP Code:
  <?php
  
//Start Script
  //Function
  
function checkOK($field)
{
if (
eregi("\r",$field) || eregi("\n",$field)){
die(
"Invalid Input!");
}
}
  
//Function End
  //Variables
$username $_post['username'];
checkOK($username);
$pass $_post['pass'];
checkOK($pass);
$passrep $_post['passrep'];
checkOK($passrep);
$email $_post['email'];
checkOK($email);
$name $post['name'];
checkOK($name);
$database "[removed]";
$dbusername "[removed]";
$dbpassword "[removed]";
   
//Variables End
   //Password Check
   
if ($pass==$passrep){
   
   
//Mail
$message = ('--'.$name.'has registered at [removed].com with the email'.$email.' and the username'.$username.'!');
if(
mail('[removed]','Register',$message)) {
print 
"Thank you for registering at [removed].com! Please return to home and log on!";
} else {
print 
"Were sorry for the inconvenience but you are currently unavailable to register on [removed].com. Please try again later.";
}
   
//Mail End
   //MySQL
mysql_connect(localhost,$dbusername,$dbpassword);
@
mysql_select_db($database) or die( "Unable to select database");
mysql_query($query);
$query "INSERT INTO users VALUES ($name,$username,$pass,$email)";

mysql_close();
   
//End Script
?>
lukeburns is offline   Reply With Quote