Skip to content

Instantly share code, notes, and snippets.

@ramytamer
Last active August 29, 2015 14:19
Show Gist options
  • Select an option

  • Save ramytamer/1bd1b0ad4deeb84aeb1f to your computer and use it in GitHub Desktop.

Select an option

Save ramytamer/1bd1b0ad4deeb84aeb1f to your computer and use it in GitHub Desktop.
register
<?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