Character creation isn\'t enabled yet!
Your userid is ' . $userid . '
'; //delete this line when script is done 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($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'; echo '

Return to home.'; exit(); } else if ($cname === ""){ echo 'Please enter a name for your character
'; echo 'Please click HERE to try again'; echo '

Return to home.'; exit(); } else if ($profid === ""){ echo 'Please choose a profession
'; 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)"; if (!$resultcreate = $con->query($sqlcreate)){ die ('There was an error running the query [' . $con->error . ']'); } header("refresh:3;url=gw-toon.php"); /* echo 'SQL Code w/ variables is: ' . $sqlcreate . ''; echo 'Character creation database insertion code here'; */ } else { echo '
'; echo 'Character name:
'; echo 'Birthdate:
'; $sqlprofession = "SELECT * FROM (SELECT * FROM listruneprofessions ORDER BY runeprofid DESC LIMIT 10) sub ORDER BY runeprofid ASC"; if (!$result = $con->query($sqlprofession)){ die ('There was an error running the query [' . $con->error . ']'); } echo 'Profession:

'; echo '
'; } ?>

Return to home.