diff --git a/gw-create.php b/gw-create.php index 6985045..c16f22b 100644 --- a/gw-create.php +++ b/gw-create.php @@ -15,6 +15,13 @@ if ($createnew === "1"){ $cname = mysqli_real_escape_string($con, $_POST['cname']); $bdate = mysqli_real_escape_string($con, $_POST['bdate']); $profid = mysqli_real_escape_string($con, $_POST['professionid']); + list ($y, $m, $d) = explode('-', $bdate); + if (!checkdate($y, $m, $d)) { + echo 'Date format is YYYY-MM-DD / 2005-04-28'; + echo 'Please click HERE to try again'; + echo '

Return to home.'; + exit(); + } $sqlcreate = "INSERT INTO `playername` (charname, birthdate, userid, professionid) VALUES ('$cname', '$bdate', $userid, $profid)"; echo 'SQL Code w/ variables is: ' . $sqlcreate . ''; echo 'Character creation database insertion code here';