Advertisement
Guest User

Untitled

a guest
Jun 18th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.23 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>
  4. wedstrijd aanwezigheid
  5. </title>
  6. </head>
  7. <body>
  8. <form  name ="johanDeMoor" method ="Post" action ="klikding.php">
  9. <table>
  10. <tr>
  11. <td>
  12. Johan De Moor
  13. </td>
  14. <td>
  15. <input type="radio" name="johandemoor" value="aanwezig" /> aanwezig
  16. </td>
  17. <td>
  18. <input type="radio" name="johandemoor" value="afwezig" /> afwezig
  19. </td>
  20. <td>
  21. <input type = "Submit" name = "Submit" value = "keuze bevestigen" />
  22. </td>
  23. </tr>
  24. </table>
  25. </form>
  26. <?php
  27.  
  28. /**
  29. * @author johan de moor
  30. * @copyright 2010
  31. */
  32.  
  33. $link = mysql_connect('localhost', 'noorse', 'noorse')
  34.    or die('Could not connect: ' . mysql_error());
  35. echo 'Connected successfully';
  36. mysql_select_db('voetbal') or die('Could not select database');
  37. echo "<br />";
  38. $selected_radio = $_POST['johandemoor'];
  39. $username = "johan";
  40. if (isset($_POST['Submit']))
  41. {
  42.     $selected_radio = $_POST[''];
  43. }
  44. $query = "INSERT INTO login (username, password, ID, aanwezig) VALUES ($username, '', '', $selected_radio)";
  45. mysql_query($query);
  46. $queryaanwezig = "SELECT aanwezig FROM login WHERE username = {'$username'} && password = '{$password}' ";
  47. $aanwezig = mysql_query($queryaanwezig);
  48.  
  49. echo $aanwezig;
  50. // Echoes: string
  51. echo gettype($array['user_id']);
  52. ?>
  53. </body>
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement