Цель: поиск значения в базе,
если есть "good", если нет записываем.
Исправьте пожалуйста ошибку в скрипте.
$telephone = addslashes($telephone);
if (!$telephone)
{ echo "You have not entered search details. Please go back and try again.";
exit; }
@ $db = mysql_pconnect("localhost");
if (!$db)
{ echo "Error: Could not connect to database. Please try again later.";
exit; }
$r=mysql(taras,"select * from telephone telephone");
for($i=0; $i {
$f=mysql_fetch_array($r);
$t=$f[telephone];
$pos = strpos($f ,$telephone);
if ($pos===false);
{$query = "insert into telephone values (\'".$telephone."\')";
$result = mysql_query($query);
if ($result)
{echo mysql_affected_rows()." information inserted into database.";}
}
else
{echo "was find";}
}