-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadd.php
34 lines (34 loc) · 901 Bytes
/
add.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
<?php
session_start();
if (isset($_SESSION['authentiate'])&&$_SESSION['authentiate']==1) {
include('connection.php');
if($_POST['addwebsite'])
{
$website_name=$_POST['website_name'];
$website_url=$_POST['website_url'];
$website_description=$_POST['website_description'];
$website_keyword=$_POST['website_keyword'];
if($website_name!=""&&$website_url!=""&&$website_description!=""&&$website_keyword!="")
{
$query="INSERT INTO website values ('$website_name','$website_url','$website_description','$website_keyword')";
$results=mysqli_query($conn,$query);
if($results==FALSE)
{
echo mysqli_error();
echo Error;
}
else{
echo "Data entered";
}
}
}
else
echo "Wrong";
}
else
{
echo "Fail";
header("Location: loginpage.php");
exit();
}
?>