-
Notifications
You must be signed in to change notification settings - Fork 0
/
configrelease.php
58 lines (27 loc) · 1.25 KB
/
configrelease.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
$host = "localhost";
$username = "root";
$password = "";
$dbname = "codev4jm_1assam";
// Create connection
$conn= mysqli_connect($host,$username)or die("Could'nt connect to database");
$news_title = $_POST['news_title'];
$news_cat = $_POST['news_cat'];
$section = $_POST['section'];
$press_release = $_POST['press_release'];
$logo_press = $_POST['logo_press'];
$sender_name = $_POST['sender_name'];
$sender_email = $_POST['sender_email'];
$sender_phone = $_POST['sender_phone'];
$organization_name = $_POST['organization_name'];
$form_id=$_POST['form_id'];
if($_POST && "all required variables are present") {
session_start();
if($_POST['captcha'] != $_SESSION['digit']) die("Sorry, the CAPTCHA code entered was incorrect!");
session_destroy();
}
// Check connection
mysqli_select_db($conn,$dbname)or die("No database");
mysqli_query($conn,"INSERT INTO codev4jm_1assam.contact(form_id,news_title,news_cat,section ,press_release,logo_press,sender_name,sender_email,sender_phone,organization_name) VALUES ('$form_id','$news_title','$news_cat','$section' ,'$press_release','$logo_press','$sender_name','$sender_email','$sender_phone','$organization_name')")or die(mysqli_error($conn));
echo 'Data added';
?>