Here is my code $dataOK=TRUE; //enter rows into database foreach($_POST['Activity'] as $row=>$Act) { if (!empty($_POST['Activity'][$row])) { $Activity=($Act); if(!empty($_POST['Activity'][$row]) && !ctype_alpha($_POST['Activity'][$row])) {echo '<b>One of your Activity columns is not in the proper format. Make Sure it is a word<br/>';$dataOK=FALSE;} $Position=($_POST['Position'][$row]); if (!empty($_POST['Position'][$row]) && !ctype_alpha($_POST['Position'][$row])) {echo '<b>One of your Position columns is not in the proper format. Make sure it is a word.<br/>';$dataOK=FALSE;} $StartDate=($_POST['StartDate'][$row]); if (!empty($_POST['StartDate'][$row]) && !preg_match('/^(0[1-9]|1[0-2])-(19|20)\d{2}$/',$_POST['Startdate'][$row])) {echo '<b>One of your Start Date columns is not in the proper format. Make Sure it is MM-YYYY<br/>';$dataOK=FALSE;} $EndDate=($_POST['EndDate'][$row]); if (!empty($_POST['EndDate'][$row]) && !preg_match('/^(0[1-9]|1[0-2])-(19|20)\d{2}$/',$_POST['Startdate'][$row])) {echo '<b>One of your End Date columns is not in the proper format. Make Sure it is MM-YYYY<br/>';$dataOK=FALSE;} if($dataOK && !empty($_POST['Activity'][$row]) && !empty($_POST['Position'][$row])&& !empty($_POST['StartDate'][$row]) && empty($_POST['EndDate'][$row]) ) { $involv = "INSERT INTO Involvement (Activity, Position, StartDate, EndDate,ULVID) VALUES ('$Activity','$Position','$StartDate','$EndDate','$ULVID')"; } if (!mysql_query($involv,$con)) { die('Error: ' . mysql_error()); } echo "Record Added<br/>"; } } Code (markup): Even if i put in a correct date format the parser is telling me that it's wrong. Can you see anything I messed up on? the date is supposed to be in MM-YYYY format. Thankyou in advanced