-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpforproject.php.txt
42 lines (32 loc) · 970 Bytes
/
phpforproject.php.txt
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 action="connect.php" method="post">
££ connect .phph is the name of php file
in the html code for the input we will use the names that were innitialized in the input field
<?php
$firstname= $_POST['firstname'];
$lastname= $_POST['lastname'];
$temperature= $_POST['tepmerature'];
$pressure= $_POST['pressure'];
$fever= $_POST['fever'];
$diahorea= $_POST['diahorea'];
// databse connection
creating database name like
Patients_information
id; auto increment
firstName:varchar(50)
lastName:varchar(50)
temperature:varchar(50)
pressure:varchar(50)
$conn=new mysqli('localhost','root','','test');
if($conn->connect_error){
die('Connection failed :'$conn->connect_error);
}else
{
$stmt=$conn->prepare("insert into patientinformation(firstName,lastName,Temperature,Pressure)
values(? ,? ,? ,?)");
$stmt->bind_param("ssii",$firstname,$lastname,$temperarure,$pressure);
$stmt->execute();
echo"registeration sucessfull...";
$stmt->close();
$conn->close();
}
?>