Advertisement
Guest User

Untitled

a guest
Aug 29th, 2011
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. <?
  2.  session_start();
  3.  if(!session_is_registered(myusername)){
  4.  header("location:main_login.php");
  5.  }
  6.  ?>
  7.  <?
  8. echo "<BR>Account: ".$_SESSION["user"];
  9. //acc name
  10. include "config.php";
  11.    mysql_connect(SQL_HOST, SQL_USERNAME, SQL_PASSWORD);
  12.    mysql_select_db(SQL_DBNAME);
  13.  
  14.  
  15. $result = mysql_query("SELECT * from characters WHERE account_name='".$_SESSION["user"]."'")
  16. or die(mysql_error());  
  17.  
  18.  
  19. // keeps getting the next row until there are no more to get
  20. echo '<select name="platforma" size="1">';
  21. while($row = mysql_fetch_array( $result )) {
  22.     // Print out the contents of each row into a table
  23.  
  24.     echo '<select value="'.$row['charId'].'">'.$row['char_name'].'</option>';
  25. }
  26. echo '</select>'
  27. ?>
  28.  
  29.  
  30. /*<select name="ovoce">
  31. <option value="jb">jablko</option>
  32. <option value="hs" selected="selected">hruška</option>
  33. </select>
  34. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement