-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprocess.php
More file actions
66 lines (49 loc) · 1.88 KB
/
Copy pathprocess.php
File metadata and controls
66 lines (49 loc) · 1.88 KB
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
<?php
session_start();
$fullname = $_POST['fullname'];
$email = $_POST['email'];
$password = $_POST['password'];
$major = $_POST['major'];
$minor = $_POST['minor'];
$datee = $_POST['date'];
$A = $_POST['A'];
$B = $_POST['B'];
$C = $_POST['C'];
$G = $_POST['G'];
$S = $_POST['S'];
$_SESSION['fullname'] = $fullname;
$_SESSION['email'] = $email;
$_SESSION['major'] = $major;
$_SESSION['minor'] = $minor;
$_SESSION['datee'] = $datee;
$_SESSION['A'] = $A;
$_SESSION['B'] = $B;
$_SESSION['C'] = $C;
$_SESSION['G'] = $G;
$_SESSION['S'] = $S;
try {
$conn = new PDO("mysql:host=mysql.truman.edu;dbname=cef6418CS315", "cef6418", "ohbiethe");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("INSERT INTO studentHack (name, email, password, Acred, Bcred, Ccred, general, major, minor, graduation, Scred)
VALUES (:fullname, :email, :password, :A, :B, :C, :G, :major, :minor, :datee, :S)");
$stmt->bindParam(':fullname', $fullname);
$stmt->bindParam(':email', $email);
$stmt->bindParam(':password', $password);
$stmt->bindParam(':A', $A);
$stmt->bindParam(':B', $B);
$stmt->bindParam(':C', $C);
$stmt->bindParam(':G', $G);
$stmt->bindParam(':major', $major);
$stmt->bindParam(':minor', $minor);
$stmt->bindParam(':datee', $datee);
$stmt->bindParam(':S', $S);
$stmt->execute();
}
catch(PDOException $e)
{
echo "Error: " . $e->getMessage();
}
// end the DB connection.
$conn = null;
header("Location: main.php");
?>