forked from RohitKaushal7/BoringStuffs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddprocess.php
More file actions
42 lines (32 loc) · 825 Bytes
/
addprocess.php
File metadata and controls
42 lines (32 loc) · 825 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title></title>
<?php
$pname=$_GET['pname'];
$det=$_GET['det'];
$pprice=$_GET['pprice'];
$ppic=$_GET['ppic'];
$uid = $_GET['uid'];
$pass = $_GET['pass'];
$con = mysqli_connect('localhost','root','');
mysqli_select_db($con,'hack3');
$add = "insert into products values('','$pname','$det',$pprice,'$ppic',$uid)";
$res = mysqli_query($con,$add);
if($res)
{
echo '
<div style="color: #f41; font-size: 5em; display: flex; justify-content: center;align-items: center; height: 650px; font-family: montserrat,roboto,arial;"> Added Successfully</div>
';
header("refresh:2; url=main.php?uid=$uid&pass=$pass");
}
else
{
echo "error";
header("refresh:2; url=main.php?uid=$uid&pass=$pass");
}
?>
</head>
<body>
</body>
</html>