Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>
- wedstrijd aanwezigheid
- </title>
- </head>
- <body>
- <form name ="johanDeMoor" method ="Post" action ="klikding.php">
- <table>
- <tr>
- <td>
- Johan De Moor
- </td>
- <td>
- <input type="radio" name="johandemoor" value="aanwezig" /> aanwezig
- </td>
- <td>
- <input type="radio" name="johandemoor" value="afwezig" /> afwezig
- </td>
- <td>
- <input type = "Submit" name = "Submit" value = "keuze bevestigen" />
- </td>
- </tr>
- </table>
- </form>
- <?php
- /**
- * @author johan de moor
- * @copyright 2010
- */
- $link = mysql_connect('localhost', 'root', '')
- or die(print 'Could not connect: ' . mysql_error());
- echo 'Connected successfully';
- mysql_select_db('voetbal') or die(print 'Could not select database');
- echo "<br />";
- $selected_radio = $_POST['johandemoor'];
- $username = "johan";
- if (isset($_POST['Submit']))
- {
- $selected_radio = $_POST[''];
- }
- $query = "INSERT INTO login (username, password, ID, aanwezig) VALUES ('".$username."', '', '','". $selected_radio."')";
- mysql_query($query) or die(print mysql_error());
- $queryaanwezig = "SELECT aanwezig FROM login WHERE username = {'$username'} && password = '{$password}' ";
- $aanwezig = mysql_query($queryaanwezig);
- echo $aanwezig;
- // Echoes: string
- echo gettype($array['user_id']);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement