I am creating a PHP script that checks if your database contains an element with the same name. Here's the code:
<?php
$query = @mysql_query("SELECT * FROM category");
while($Row = mysql_fetch_array($query)) {
    $ID = $Row['id'];
    $Name = $Row['name'];
}
// fetch the value of the name field
$CategoryName = $_GET['name'];
if($CategoryName === $Name) {
    echo "here is an element with the same name";
}
?>
Why doesn't it work? Where is the error? Sorry for my English, I'm Italian.
 
     
     
     
     
    