Hey guys I hope someone can help here, I imagine this is something small and simple but I can't figure it out
I have the following code:
if (isset($_POST['Flavours']) && isset($_POST['Sizes']) && isset($_POST['Product_Name'])){
$flav = explode('-',$_POST['Flavours']);
$flavours = $flav[0];
$sizes = $_POST['Sizes'];
$product_name = $_POST['Product_Name'];
$result = mysql_query('SELECT Products_ID FROM products WHERE Size = "' . $sizes . '" AND Flavour = "' . $flavours . '" AND Product_Name = "' . $product_name . '"');
$row = mysql_fetch_array($result);
$product_id = $row['Products_ID'];
}
What I want to do is validate the inputs on the php side. so ifflavours,prices and sizes are set do the following.
What I want to happen is that if the flavours or sizes is blank " ". then dont do anything.
I imagine it would be something like this but I can't get it to work:
if (isset($_POST['Flavours']) && isset($_POST['Sizes']) && isset($_POST['Product_Name']) || (($_POST['Sizes'] != ' ') || ($_POST['Flavours'] != ' ')))
Thanks for the help!