Advertisement
PrincessFumi

Untitled

May 22nd, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 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. $wiersz = mysql_fetch_assoc($result);
  33. $_SESSION['Login'] = $wiersz['Login'];
  34. for($i = 0; $i<$ilu_userow; $i++)
  35. {
  36.  
  37.  
  38. echo '<FORM METHOD="get">';
  39. echo ' <SELECT NAME="lista" MULTIPLE>';
  40. echo '<OPTION VALUE="$i">$_SESSION['Login'], "</br>"</OPTION>
  41. </SELECT>';
  42. }
  43.  
  44. echo '<INPUT TYPE="SUBMIT">',
  45. ' </form>',
  46. ' <pre>',
  47.  
  48. print_r($_GET['lista']);
  49.  
  50. '</pre>';
  51. ?>
  52. </body>
  53. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement