-
Notifications
You must be signed in to change notification settings - Fork 1
/
save_list.php
40 lines (38 loc) · 1.25 KB
/
save_list.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
<?php
session_start();
require "connection.php";
if (isset($_POST['submit'])) {
$user_id = $_SESSION['user_session']['user_id'];
$inter_subject = $_POST['inter_subject'];
$inter_percentage = $_POST['inter_percentage'];
$interested_program = $_POST['interested_program'];
$fee_start = $_POST['fee_start'];
$fee_end = $_POST['fee_end'];
$admission_date = $_POST['admission_date'];
$season = $_POST['season'];
$sql = "INSERT INTO search_list (
user_id,
inter_subject,
inter_percentage,
interested_program,
fee_start,
fee_end,
admission_date,
season
) VALUES (
'$user_id',
'$inter_subject',
'$inter_percentage',
'$interested_program',
'$fee_start',
'$fee_end',
'$admission_date',
'$season'
)";
$fire = $conn->prepare($sql);
if ($fire->execute()) {
header('location:my_search_list.php?status=success');
}
} else {
header('location:my_search_list.php?status=error');
}