hello, I have got a form with 3 fields (20 form on 1 page). Sometimes there is no entry on title field but there is entry on description and fullpage fields. All i want to do is if there is no entry on title i just do not want to put it into database. How can i do this? $title=$_POST['title'][$i]; $description=$_POST['description'][$i]; $fullpage=$_POST['fullpage'][$i]; $query="INSERT INTO `file` VALUES ('', '".$title."', '".$description."', '".$fullpage."')"; mysql_query($query); echo mysql_error(); $c++; } } echo '<center><b>'. $c.' entries put into database</b></center><br/>'; mysql_close($link); } PHP: Thanks
if (empty($title) || empty($description) || empty($fullpage)) { // redirect or exit script } // or if ($title=="" || $description=="" || $fullpage=="") { // redirect or exit script } PHP: