What's wrong with this php/mysql code. I recieve the die function everytime?

Findd Online

New member
$Random_Number = rand(100,100000000000);
$Check_Number = mysql_query("SELECT * FROM products WHERE randomnumber='$Random_Number'");
$Check_Final = mysql_num_rows($Check_Number);

while($Check_Final != '0')
{
$Random_Number = rand(100,100000000000);
}

$File_Name = $Random_Number . ".php";
$Zero = '0';

$Query = mysql_query("INSERT INTO products (title,url,finalurl,category,owner,shortdescription,longdescription,price,rank,tag1,tag2,tag3)
VALUES ('$Title','$File_Name','$url','$Category','$Username','$SD','$LD','$Price','$Zero','$Tag1','$Tag2','$Tag3')");

if(!$Query)
{
die("There was an error creating your product!");
}
 
Back
Top