<?php
include("db.php");
$name=$_REQUEST['name'];
$mail=$_REQUEST['email'];
$yname=$_REQUEST['yname'];
$result=mysql_query("SELECT * FROM information WHERE uname = '$name' ");
if (mysql_num_rows($result) == 0) {
$query=mysql_query("INSERT into noresult (Serial,searchname,yourname,email)
VALUES ('',$name','$yname','$mail')");
if ($query){
header('Location:nullresult.php');
}
else{
echo "Query failure";
}
}
?>
This returns 'Query Failure'. It was working sometime back with table name 'seeker'. Then I dropped it and created a new table 'noresult' as the previous one was a bit messed up. Suddenly the query fails.
Note: seeker and noresult have same columns.