Just a web script to help track when, where, and what you got from the free treasures scattered about Nightfall in the game Guild Wars.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

23 righe
1.1 KiB

  1. <?php
  2. include_once 'gw-connect.php';
  3. $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
  4. if ($con->connect_errno > 0){
  5. die ('Unable to connect to database [' . $db->connect_errno . ']');
  6. }
  7. $sql = "SELECT playerid, charname FROM `playername` WHERE `userid` = '1' ORDER BY `charname` ASC"; //need to make userid a variable
  8. if (!$result = $con->query($sql)){
  9. die ('There was an error running the query [' . $con->error . ']');
  10. }
  11. /* while ($row = $result->fetch_array()){
  12. echo 'Please select a character to continue: <A HREF="gw-pull.php?toonid=' . $row['charname'] . '">' . $row['charname'] . '</A><BR />';
  13. } */
  14. //will be changing weblink with GET data to SELECT box with POST data
  15. echo '<FORM METHOD="POST" NAME="cselect" ACTION="gw-pull.php">';
  16. echo '<SELECT NAME="cname">';
  17. while ($row = $result->fetch_array()){
  18. $charid = $row['playerid'];
  19. $charname = $row['charname'];
  20. echo '<OPTION VALUE="' . $charid . '">' . $charname . '</OPTION>'; //need to change first charname variable to charid once I work out the SQL query
  21. }
  22. echo '<INPUT TYPE="SUBMIT" VALUE="Choose Toon"></FORM>'; //gw-pull doesn't accept post data yet. or does it?
  23. ?>