From c9380b69b3b7a6b5afc1d0dd0851c0c582f33288 Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Thu, 25 May 2017 16:20:41 -1000 Subject: [PATCH] moved variable around for checkdate because EVERY date is currently wrong, even correct dates :/ --- gw-create.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gw-create.php b/gw-create.php index 697b5ea..80b78c8 100644 --- a/gw-create.php +++ b/gw-create.php @@ -10,13 +10,13 @@ include_once 'gw-connect.php'; $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); $createnew = mysqli_real_escape_string($con, $_POST['docreate']); $userid = $_SESSION['userid']; -echo '
Character creation isn\'t enabled yet!
Your userid is ' . $userid . ''; +echo '
Character creation isn\'t enabled yet!
Your userid is ' . $userid . '
'; 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)) { + if (!checkdate($m, $d, $y)) { echo 'Date is invalid ' . $bdate . '
'; echo 'Date format is YYYY-MM-DD / 2005-04-28
'; echo 'Please click HERE to try again';