PHP select from database and compare result Problem

My Boss Good day and Good day evry1 in here happy Sunday. i have a php script dat is suposse to register users into a database. bt 1st i want it to chk d user password with a pin code in the data base and the user password and my db pin match den we add the user details to the database else we echo an error bt i dnt seem to b getting it. please help me dis d php script:
[php]
$connect=mysql_connect("$host","$user","$password")
or die(“Bross why na, change the localhost to example site.com without www. “);
$select=mysql_select_db(”$db_name”)
or die(“dagogo change the db”);

//collection data from registration form and processing encrypting it
$first_name=($_POST[“First_Name”]);//user 1st name
$last_name=($_POST[“Last_Name”]);//user last name
$username=($_POST[“UserName”]);//user special User name
$phone=($_POST[“Phone”]);//user phone number
$email=($_POST[“email”]);//user email address
$password=($_POST[“password”]);//user password

//checking the pin with pin in the database

$query=mysql_query(“SELECT * FROM pin_code WHERE pin=’$password’”);
$numrows=mysql_num_rows($query);
if($numrows!=0)
{
while($row =mysql_fetch_assoc($query))
{

$dbpassword=$row[‘pin’];

}
if($password==$dbpassword)
{

//inserting the form details into the database.
mysql_query(“INSERT INTO users(first_name,last_name,username,phone,email,password)VALUES(’$first_name’,’$last_name’,’$username’,’$phone’,’$email’,’$password’)”)or die (“Registration failed”);
}
else
{
echo"dagogo";
}
[/php]

and kip on get this error
[php]Parse error: parse error in C:\wamp\www\9ja School Solution\register.php on line 114[/php]
wic hapenns to be d last line of d script[php]"?>"[/php]
please help if i should remove the pin check layer the script will run vry fin bt i nid dat part

i av corrected d error missed a } d last }bt it is nw echoing d error

I AV DONE IT my mistake was that i hash my input and the pin in db was not hash so this is the code

[php]
$query = mysql_query(“SELECT * FROM pin_code WHERE pin = '”.htmlspecialchars($password, ENT_QUOTES)."’");

 if(mysql_num_rows($query) == '1'){
   // Pin found - create user with kung-fu query
 
 

 
 
//inserting the form details into the database.
mysql_query("INSERT INTO users(first_name,last_name,username,phone,email,password)VALUES('$first_name','$last_name','$username','$phone','$email','$password3')")or die ("Registration failed");
echo"Thank you";
}

else{
   echo "'<p>Pin not found</p>'";
   echo "'<p>Posted Pin: '.$password.'</p>"; 
   // <--- is this displayed value the exact value stored in db ????
 }[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service