-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.php
33 lines (32 loc) · 1.07 KB
/
form.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
<?php
if(isset($_POST['submit'])) {
$name = $_POST['name'];
$password = $_POST['password'];
$email = $_POST['email'];
$age = $_POST['age'];
$date = $_POST['date'];
$number = $_POST['number'];
$cell = $_POST['cell'];
$genre = $_POST['genre'];
$dropdown = $_POST['dropdown'];
$text = $_POST['text'];
$checkbox = $_POST['checkbox'];
$gender = $_POST['gender'];
$file = $_POST['file'];
$url = $_POST['url'];
$color = $_POST['color'];
$hidden = $_POST['hidden'];
$host = "184.154.47.82";
$dbUsername = "cdmgacom_form_project";
$dbPassword = "form_project";
$dbname = "cdmgacom_form_project";
$dbconnect=mysqli_connect($host,$dbUsername,$dbPassword,$dbname);
$sql =mysqli_query($dbconnect,"insert into form(ID,name,password,email,age,date,number,cell,genre,dropdown,text,checkbox,gender,file,url,color,hidden) values('','$name','$password','$email','$age','$date','$number','$cell','$genre','$dropdown','$text','$checkbox','$gender','$file','$url','$color','$hidden')");
if($sql) {
echo "Data inserted successfully!";
}
else {
echo "Failed to insert...";
}
}
?>