| @@ -1,7 +1,8 @@ | |||||
| <TITLE>Treasure Data</TITLE> | |||||
| <?php | <?php | ||||
| include_once 'gw-connect.php'; | include_once 'gw-connect.php'; | ||||
| $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); | $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); | ||||
| $cnameid = mysqli_real_escape_string($con, $_GET['toonid']); //need to sanitize this input somehow | |||||
| $cnameid = mysqli_real_escape_string($con, $_POST['cname']); //need to sanitize this input somehow | |||||
| if ($con->connect_errno > 0){ | if ($con->connect_errno > 0){ | ||||
| die ('Unable to connect to database [' . $db->connect_errno . ']'); | die ('Unable to connect to database [' . $db->connect_errno . ']'); | ||||
| } | } | ||||
| @@ -28,5 +29,6 @@ if (mysqli_num_rows($result) > 0) { | |||||
| echo 'no data to display for that character'; | echo 'no data to display for that character'; | ||||
| } | } | ||||
| ?> | ?> | ||||
| <TITLE>Treasure Dates</TITLE> | |||||
| <BODY> | |||||
| <BR /> | |||||
| Return to <A HREF=gw-toon.php">character selection</A> page | |||||
| @@ -8,7 +8,16 @@ $sql = "SELECT playerid, charname FROM `playername` WHERE `userid` = '1' ORDER B | |||||
| if (!$result = $con->query($sql)){ | if (!$result = $con->query($sql)){ | ||||
| die ('There was an error running the query [' . $con->error . ']'); | die ('There was an error running the query [' . $con->error . ']'); | ||||
| } | } | ||||
| while ($row = $result->fetch_array()){ | |||||
| /* while ($row = $result->fetch_array()){ | |||||
| echo 'Please select a character to continue: <A HREF="gw-pull.php?toonid=' . $row['charname'] . '">' . $row['charname'] . '</A><BR />'; | echo 'Please select a character to continue: <A HREF="gw-pull.php?toonid=' . $row['charname'] . '">' . $row['charname'] . '</A><BR />'; | ||||
| } */ | |||||
| //will be changing weblink with GET data to SELECT box with POST data | |||||
| echo '<FORM METHOD="POST" NAME="cselect" ACTION="gw-pull.php">'; | |||||
| echo '<SELECT name="cname">'; | |||||
| while ($row = $result->fetch_array()){ | |||||
| $charid = $row['playerid']; | |||||
| $charname = $row['charname']; | |||||
| echo '<OPTION VALUE="' . $charid . '">' . $charname . '</OPTION>'; | |||||
| } | } | ||||
| ?> | |||||
| echo '<INPUT TYPE="SUBMIT" VALUE="Choose Toon"></FORM>'; //gw-pull doesn't accept post data yet. or does it? | |||||
| ?> | |||||