/
signUpComplete.php
67 lines (57 loc) · 2.08 KB
/
signUpComplete.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
include_once("dbLogin.php");
include_once("sqlconnector.php");
echo "<link rel='stylesheet' href='signUpComplete.css' type='text/css' />";
session_start();
error_reporting(0);
$host = "localhost";
$dbuser = "user";
$dbpassword = "user";
$database = "calendapp";
$table = "users";
$connector = new SQLConnector(new Credentials($host, $dbuser, $dbpassword, $database));
$connector->connect();
$UserName = $_SESSION['username'];
$UserEmail = $_SESSION['email'];
$UserProPic = $connector->retrieve("select profilepic from users where email='$UserEmail'")['profilepic'];
if ($UserProPic == null) {
$UserProPic = 'img/default.jpg';
} else {
$UserProPic = "profilepics/".$UserProPic;
}
if (isset($_POST["Return"])) {
header('Location: main.php');
}
/*************************************************************************/
$scriptName = $_SERVER["PHP_SELF"];
echo "
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<title>Sign Up Complete</title>
<link rel='stylesheet' href='signUpComplete.css' type='text/css' />
</head>
<body>
<div id='subtitle'>
<img src='img/welcome.png' alt='Sign Up' id='signt'>
</div>
<form action='$scriptName' method='post' id='form'>
<h2>You can now start posting and uploading pictures of the events around campus!</h2>
<h3> To begin just go to the home page and click on the 'Post' button.<br /> If
you feel like browsing, just look thorugh the calendar.</h3>
<p>
Username: $UserName</br><br>
Email: $UserEmail</br><br>
Profile Picture: <br><img src='$UserProPic' alt='photo' id='profilepic' style='max-height: 200px'/></br>
</p>
</br>
<p>
<input type='submit' name='Return' value = 'Go to home page! 'id='join' />
</p>
</form>
<div id='sub'>
<img src='img/welcomeextra.png' alt='Sign Up' id='extra'>
</div>
</body>
</html>";
?>