-
Notifications
You must be signed in to change notification settings - Fork 0
/
insert.php
42 lines (33 loc) · 1.02 KB
/
insert.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
<form method="post" action="updateinfo.php">
id <input type="text" name="id" >
no of people <input type="password" name="password">
when cooked <input type="text" name="when" >
desc <input type="text" name="desc" >
packed<input type="packed" name="pack" >
temp<input type="text" name="temp" >
pickup<input type="text" name="pick" >
status <input type="text" name="status" >
<input type="submit" name="submit">
<?php
$id = $_POST["id"];
$pass = $_POST["password"];
$when = $_POST["when"];
$desc = $_POST["desc"];
$pack = $_POST["pack"];
$temp = $_POST["temp"];
$pick = $_POST["pick"];
$status = $_POST["status"];
$user="root";
$password="";
$host="localhost";
$db_name="Annadhan";
$sql="insert into contact_info values('".$id."','".$pass."','".$when."','".$desc."','".$pack."','".$temp."','".$pick."','".$status."');";
if(mysqli_query($con,$sql)){
echo "insertion sucessful";
}
else{
echo "Error in insertion";
}
mysqli_close($con);
?>
</form>