Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $product_name = mysql_real_escape_string($_POST['product_name']);
- $product_name = sanitize($product_name);
- $query = mysql_query("SELECT * FROM products WHERE product_name = '$product_name' LIMIT 1");
- $match = mysql_num_rows($query); // count the output amount
- if (($match > 0)===true) {
- $errors[]='Sorry you tried to place a duplicate "Product Name" into the system!';
- break 1;
- }
- if ($match > 0) {
- if (($match > 0)===true) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement