Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // example form in register page
- <form action="post.php">
- <input type="hidden" name="action" value="register">
- <input type="text" name="email">
- <input type="text" name="username">
- <input type="password" name="email">
- <input type="submit" value="register">
- </form>
- //post.php file
- // check to see what action we are dealing with
- if( isset($_POST['action']) && $_POST['action'] == 'register' ) {
- // check to see if all the fields have been posted
- if( isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password']) ) {
- // store into variables for use
- $email = $_POST['email'];
- $username = $_POST['username'];
- $password = $_POST['password'];
- //rest of code...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement