//Trying to Make Sure All Inputs are Filled in... and no crap. $x=0; for($x==0; $x <= $_SESSION['amount']; $x++) { if(empty($_POST['input'][$x])) { header("Location: madlibsonline.php"); } else { $value = addslashes(trim($_POST['input'][$x])); if($keywords=="") { $keywords = $value; } else { $keywords = $keywords . ',' . $value; } } } //What I Had Previously... But Not Good Enough for Validation Reason... foreach ($_POST['input'] as $key => $value) { if($key=="") { header("Location: madlibsonline.php"); } else { $key = addslashes(trim($value)); if($keywords=="") { $keywords = $key; } else { $keywords = $keywords . ',' . $key; } } }