-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuccess1.php
32 lines (30 loc) · 828 Bytes
/
success1.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
<?php
require_once 'Database/config.php';
if (isset($_POST['update']))
{
//Get values from new POST
$id = $_POST['id'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$dob = $_POST['dob'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$speciality = $_POST['speciality'];
//Call the CRUD function
$result = $crud->update_student($id, $fname, $lname, $dob, $speciality, $email, $phone);
//Redirect to index.php
if($result)
{
header("Location: record.php");
}
else
{
include 'Includes/error.php';
header("Location: record.php");
}
}
else{
include 'Includes/error.php';
header("Location: record.php");
}
?>