if (!preg_match("/^[a-zA-Z0-9_]{1,15}$/", $_POST['size'])) {die("error, not valid"); exit();}
if (!preg_match("/^[a-zA-Z0-9_]{1,15}$/", $_POST['quantity'])) {die("error, not valid"); exit();}
if (!preg_match("/^[a-zA-Z0-9_]{1,15}$/", $_POST['item'])) {die("error, not valid"); exit();}
im guessing theres got to be a cleaner way to do that, especially when i have more variables… i tried this, but it didnt work
if (!preg_match("/^[a-zA-Z0-9_]{1,15}$/", $_POST)) {die("error, not valid"); exit();}