-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstart_negotiations.php
More file actions
35 lines (32 loc) · 913 Bytes
/
start_negotiations.php
File metadata and controls
35 lines (32 loc) · 913 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
<?php
require_once "core.php" ;
require_once "connection.php" ;
if(isset($_POST['create_neg_adv_id']) && !empty($_POST['create_neg_adv_id']) && isset($_POST['create_neg_username']) && !empty($_POST['create_neg_username']))
{
$adv_id = $_POST['create_neg_adv_id'];
$interested_username = $_POST['create_neg_username'];
if(isset($_POST['message']) && !empty($_POST['message']))
$message = $_POST['message'];
else
$message = "";
echo $message ; echo $adv_id;
$sql_query = "INSERT into `negotiations` VALUES (NULL,'$adv_id','$interested_username','$message')";
$result = mysqli_query($conn,$sql_query);
if($result)
{
echo "Negotiation successfully created.";
header('location: '.$http_referer);
die();
}
}
else
echo "some error occurred" ;
?>
<html>
<title>
Start Negotiations.
</title>
<body>
<a href = "home.php" > Click Here To goto HOME </a>
</body>
</html>