Please someone what is wrong with this code?
It is suppose to check if password and login allready exist in a database and if it does it is supposed to return a string and if it doesn't exist it shold enter the users info into the database.
<?
/ this script will handle the variables passed from the index.html file /
/ declare some relevant variables /
$hostname = "www.swedee.com";
$username = "**";
$password = "";
$dbName = "**";
$userstable = "yp";
/____________________ make connection to database ____________________ */
MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to database");
@mysql_select_db("$dbName") or die("Unable to select database");
/____________________ check user(phone) and password ____________________ /
$sql="SELECT * FROM yp WHERE password='$pass' AND phone='$phone';
$res = mysql_query($sql);
if(!($rad=mysql_fetch_array($res))){
/ ____________________ Insert information into table ____________________ /
$sql2 = "INSERT INTO yp(name,search1,search2,search3,search4,search5,adress,village,phone,email,web,info,smallinfo,fax,password)";
$sql2=$€sql2."VALUES('$name','$search1','$search2','$search3','$search4','$search5'.'$adress','$village','$phone','$email','$web','$info','$smallinfo','$fax','$pass')";
$result = mysql_query(sql2);
}
else {
echo "upptaget";
}
/ ____________________ Close the database connection ____________________ /
MYSQL_CLOSE();
?>