Last active
August 29, 2015 14:19
-
-
Save ramytamer/1bd1b0ad4deeb84aeb1f to your computer and use it in GitHub Desktop.
register
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'app.php'; | |
| $app = new App; | |
| if ( isset($_POST['name'], $_POST['email'], $_POST['password']) ) { | |
| $name = $_POST['name']; | |
| $email = $_POST['email']; | |
| $password = $_POST['password']; | |
| if($id = $app->register($name, $email, $password)) { | |
| $_SESSION['user'] = $id; | |
| header("Location: feed.php"); | |
| exit(); | |
| }else{ | |
| echo ' ERROR !'; | |
| } | |
| }else{ | |
| echo 'error mfish input ybn el mra'; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment