-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate.php
More file actions
23 lines (20 loc) · 746 Bytes
/
create.php
File metadata and controls
23 lines (20 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
include 'connections.php';
if (isset($_POST['submit'])){
$first_name = $_POST['firstName'];
$last_name = $_POST['lastName'];
$email = $_POST['email'];
$passWord = password_hash($_POST['password'], PASSWORD_DEFAULT);
$gender = $_POST['gender'];
$command = "INSERT INTO members (fname, lname, email, password, gender) VALUES
('$first_name',
'$last_name',
'$email',
'$passWord',
'$gender'
)";
$action = $conn -> query($command);
if ($action) echo "Data added successfully!";
else echo "Adding failed";
$conn -> close();
}