diff --git a/gw-create.php b/gw-create.php index 0812082..c85b9f9 100644 --- a/gw-create.php +++ b/gw-create.php @@ -10,7 +10,7 @@ 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 . '
'; //delete this line when script is done +//echo '
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']); @@ -34,10 +34,13 @@ if ($createnew === "1"){ 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'; + 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 'Form creation code goes here'; echo '
'; echo 'Character name:
'; echo 'Birthdate:
';