-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhandler_registration.php
More file actions
39 lines (31 loc) · 1003 Bytes
/
handler_registration.php
File metadata and controls
39 lines (31 loc) · 1003 Bytes
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
34
35
36
37
38
39
<?php
session_start();
include("account.php");
include("loginfunctions.php");
//error reporting code
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
ini_set('display_errors' , 1);
//DB Connection
$db = mysqli_connect($hostname, $username, $password, $project);
if (mysqli_connect_errno())
{ echo "Failed to connect to MySQL: " . mysqli_connect_error();
exit();
}
print "Successfully connected to MySQL.<br>";
mysqli_select_db($db,$project);
$delay = 3;
//get data
getData("email", $email);
getData("pass", $pass);
getData("firstname", $firstname);
getData("lastname", $lastname);
//check to see if data is good
if ($bad) exit("Bad Data");
//insert data into accounts table
register($email, $firstname, $lastname, $pass, $t);
echo "
<script>
alert(\"Successfully Registered. Please log in.\");
window.location.replace(\"/vr/index.html\");
</script>
";