Advertisement
PrincessFumi

Untitled

May 22nd, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. <?php
  2.  
  3. require_once 'mail.php';
  4. session_start();
  5. include "connect.php";
  6. $polaczenie = mysql_connect("$host","$db_user","$db_password");
  7. mysql_select_db("$db_name");
  8. if(!isset($_SESSION['zalogowany']))
  9. {
  10. header('Location: menu.php');
  11. exit();
  12. }
  13.  
  14. ?>
  15. <!DOCTYPE HTML>
  16. <html lang="pl">
  17. <head>
  18. <meta charset="utf-8" />
  19. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  20. <title>ZaproΕ› znajomych></title>
  21. </head>
  22.  
  23. <body>
  24.  
  25. <?php
  26.  
  27. $query="SELECT * FROM uzytkownicy";
  28. $result=mysql_query($query);
  29. $ilu_userow = mysql_numrows($result);
  30.  
  31. $i=0;
  32.  
  33.  
  34. echo '<FORM METHOD="get">';
  35. echo ' <SELECT NAME="lista" MULTIPLE>';
  36. for($i = 1; $i<=$ilu_userow; $i++)
  37. {
  38. $wiersz = mysql_fetch_assoc($result);
  39. $_SESSION['Login'] = $wiersz['Login'];
  40.  
  41. echo '<OPTION VALUE=',$i,'>',$_SESSION['Login'], '</OPTION>';
  42.  
  43. }
  44. echo '</SELECT>';
  45. echo '<INPUT TYPE="SUBMIT">',
  46. ' </form>',
  47. ' <pre>',
  48.  
  49. print_r($_GET['lista']);
  50.  
  51. '</pre>';
  52. ?>
  53. </body>
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement