forked from Justinjolly/DBMS_Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscholarships.php
More file actions
38 lines (25 loc) · 802 Bytes
/
scholarships.php
File metadata and controls
38 lines (25 loc) · 802 Bytes
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
<?php
$host="localhost";
$user="root";
$password="";
$db="project";
$data=mysqli_connect($host,$user,$password,$db);
if($data==false){
die("connection error");
}
else{
}
$data_fullname=$_POST['fullname'];
$data_admno=$_POST['admission'];
$data_avail=$_POST['level'];
$data_category=$_POST['Category'];
$data_dptm=$_POST['department'];
$sql="INSERT INTO `scholarships`(`scholarship_student_name`,`adm_no`,`scholarship`,`scholarship_type`,`scholarship_student_course`) VALUES('$data_fullname','$data_admno','$data_avail','$data_category','$data_dptm')";
$result=mysqli_query($data,$sql);
if($result){
header("Location:main.html?UploadSuccess");
}
else{
echo "failed";
}
?>