Skip to content
Snippets Groups Projects
Commit 48d69c6d authored by Iqbal's avatar Iqbal
Browse files

Added Register functionality. No validation yet.

parent 641eefa5
No related merge requests found
<?php
/**
* Created by PhpStorm.
* User: iqbal
* Date: 05/10/17
* Time: 16:43
*/
include_once "Controller.php";
include_once "../model/User.php";
$newUser = array(
"id" => 0,
"name" => $_POST['name'],
"username" => $_POST['username'],
"email" => $_POST['email'],
"password" => $_POST['password'],
"phone" => $_POST['phone'],
"photo" => "http://www.simian-risk.com/wp-content/themes/custom/images/empty-profile.png",
"is_driver" => 0
);
if (isset($_POST['is_driver'])) {
$newUser['is_driver'] = 1;
}
$pdo = DB::getInstance();
User::InsertUser($newUser, $pdo);
$allUser = User::GetAllUsernameAndPassword($pdo);
print_r($allUser);
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment