forked from Bengaluru18/team-9
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsert_ass.php
55 lines (45 loc) · 1.04 KB
/
insert_ass.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
include_once 'dbcon.php';
if(isset($_POST['submit']))
{
$name = $_POST['name'];
$name= ucwords(strtolower($name));
$add = $_POST['add'];
$hm = $_POST['hm_name'];
$phone = $_POST['phone'];
$comp = $_POST['computer'];
//if(isset($_POST['library']))
// $library=1;
// else
// $library =0;
$library=$_POST['library'];
// if($ans=="yes")
// $library=1;
// else
// $library=0;
//
//if(isset($_POST['science']))
// $chemicals = 1;
// else
// $chemicals=0;
$chemicals=$_POST['science'];
$water=$_POST['water'];
$sanitation=$_POST['sanitation'];
$handwash=$_POST['handwash'];
$ngo=$_POST['ngo'];
$health=$_POST['health'];
//$sid=2;
$q3=mysqli_query($con,"INSERT INTO school VALUES ('$name' , '$add' , '$hm','$phone' ,'$comp', '$library', '$chemicals', '$water', '$sanitation', '$handwash','$ngo','$health')");
if($q3)
{
header("location:asses2.php");
}
else
echo "Error";
}
//if($q3)
//
//
////header("location:account.php?q=1");
//}
?>