-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_alumnus_by_email.php
36 lines (33 loc) · 1.73 KB
/
get_alumnus_by_email.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
<!-- Gets the selected alumnus info by their email -->
<?php
if ($_SERVER["REQUEST_METHOD"] == "GET") {
if (isset($_GET["email"])){
$SQLGetAlumnusInfo = $conn->prepare("SELECT * FROM user_table WHERE email = ?");
$SQLGetAlumnusInfo->bind_param("s", $_GET['email']);
$SQLGetAlumnusInfo->execute();
$result = $SQLGetAlumnusInfo->get_result();
if ($result->num_rows > 0) {
$accountInfo = $result->fetch_assoc();
$alumnusToView = $accountInfo;
$alumnusToViewFirstName = $accountInfo['first_name'];
$alumnusToViewLastName = $accountInfo['last_name'];
$alumnusToViewName = $accountInfo['first_name']." ".$accountInfo['last_name'];
$alumnusToViewDOB = $accountInfo['dob'];
$alumnusToViewEmail = $accountInfo['email'];
$alumnusToViewGender = $accountInfo['gender'];
$alumnusToViewContactNo = $accountInfo['contact_number'];
$alumnusToViewHometown = $accountInfo['hometown'];
$alumnusToViewJobPosition = $accountInfo['job_position'];
$alumnusToViewCompany = $accountInfo['company'];
$alumnusToViewCurrentLocation = $accountInfo['current_location'];
$alumnusToViewDegree = $accountInfo['qualification'];
$alumnusToViewDegreeYearGraduated = $accountInfo['year'];
$alumnusToViewCampus = $accountInfo['university'];
$alumnusToViewProfilePicture = $accountInfo['profile_image'];
$alumnusToViewResume = $accountInfo['resume'];
}
} else{
header('Location: view_alumni.php');
}
}
?>