-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathonlineMed.php
More file actions
80 lines (63 loc) · 2.11 KB
/
onlineMed.php
File metadata and controls
80 lines (63 loc) · 2.11 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<head>
<title>CFF-Home</title>
<link rel="stylesheet" href="homePage.css">
<script>
function myFunction() {
alert("Please Enter your USER ID.");
}
</script>
</head>
<body>
<header>
<img src="IMG-20190310-WA0009.jpg" align=left width="" height="35px">
<p align="right" id="donate"> <a href="" target="_blank">DONATE</a> </p>
<br>
</header>
<div class="head">
<b>
<a href="" id="home"> HOME </a>
<a href=""> CANCER </a>
<a href=""> TYPES OF CANCER </a>
<a href=""> ONLINE MEDICINE </a>
<a href=""> NURSING.COM </a>
<a href=""> AWARENESS
</a>
<a href=""> DONATION </a>
<a href=""> SIGN UP </a>
<a href=""> CONTACT </a>
</b>
</div>
<center>
<?php
$p1=$_POST['product1'];
$name=$_POST['name'];
$p2=$_POST['product2'];
$p3=$_POST['product3'];
$pz1=$_POST['prize1'];
$pz2=$_POST['prize2'];
$pz3=$_POST['prize3'];
$servername="localhost";
$username="root";
$password="";
$con=new mysqli($servername,$username,$password);
mysqli_select_db($con,"OnlineMed");
$sql="INSERT INTO Cart (Name,Product1,Product2,Product3,Prize1,Prize2,Prize3) VALUES ('$name','$p1','$p2','$p3','$pz1','$pz2','$pz3')";
if($name)
{
if($con->query($sql)===TRUE)
{
?><marquee><p id="text"><?php echo "Added To Cart Successfully!!"?></p></marquee><?php ;
}
}
else
{
echo "Enter Your User ID";
}
$con->close();
?>
<br>
<a href="onlinemed.html"><img src="Cart-icon.png" width="70px" height="70px"></a>
</center>
</body>