Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //include the connect-script
- include("connect.php");
- //if the superglobal $_POST['name'] is set, insert the data in the database
- if(isset($_POST['name'])){
- mysql_query("INSERT INTO users (name)
- VALUES ('$_POST['name']')";
- //else, echo the form
- }else{
- echo '<form method="post" action="">
- Naam: <input type="text" name="name" /><br />
- <input type="submit" value="Registreren!" />
- </form>';
- }
- ?>
Add Comment
Please, Sign In to add comment