-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDcode.php
35 lines (27 loc) · 887 Bytes
/
Dcode.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
<?php
session_start();
require 'Ddbcon.php';
if(isset($_post['Submit']))
{
// $medID = mysqli_real_escape_string($con,$_POST['medID']);
$medName = mysqli_real_escape_string($con,$_POST['medName']);
$medBrand = mysqli_real_escape_string($con,$_POST['medBrand']);
$medQuantity = mysqli_real_escape_string($con,$_POST['medQuantity']);
$medPrice = mysqli_real_escape_string($con,$_POST['medPrice']);
$query = "INSERT INTO drug (medName,medBrand,medQuantity,medPrice) VALUES
('$medName',' $medBrand',' $medQuantity',' $medPrice')";
$quary_run = mysqli_query($con,$query);
if($query_run)
{
$_SESSION['message'] = " drugs add successfuly";
header("Location: ");
exit(0);
}
else
{
$_SESSION['message'] = " drugs not add successfuly";
header("Location: ");
exit(0);
}
}
?>