-
Notifications
You must be signed in to change notification settings - Fork 0
/
User_Registration.php
33 lines (26 loc) · 1.05 KB
/
User_Registration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
include 'init.php';
$UserEmail=$_POST['email'];
$UserPassword=$_POST['password1'];
$firstName=$_POST['firstName'];
$lastName=$_POST['lastName'];
$number=$_POST['number'];
$address=$_POST['address'];
$gender=$_POST['gender'];
$DOBday=$_POST['DOBday'];
$DOBmonth=$_POST['DOBmonth'];
$DOByear=$_POST['DOByear'];
$dob=($DOBday.'-'.$DOBmonth.'-'.$DOByear);
$profile = $_POST['profileImage'];
$host = "localhost";
$user = "root";
$pass = "";
$db = "tennisjoint";
// Create connection
$conn = new mysqli($host, $user, $pass, $db) or die("Unable to connect to database " + $db);
$insert = "insert into users (email,password,name,surname,dob,gender,phone,address,profPic,userLevel) values ('$UserEmail', '$UserPassword', '$firstName', '$lastName', '$dob', '$gender','$number', '$address', '$profile','customer')";
$stmt = $conn->prepare($insert);
$stmt->execute();
header("Location: http://localhost/Tennis_Joint/confirmationRegistration.php");
$conn->close();
?>