-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess.php
More file actions
38 lines (31 loc) · 1.07 KB
/
Copy pathprocess.php
File metadata and controls
38 lines (31 loc) · 1.07 KB
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
<?php
require_once ('connection.php');
if(isset($_POST['btn_save']))
{
$Username = mysqli_real_escape_string($con,$_POST['Fname']);
$Email = mysqli_real_escape_string($con,$_POST['Email']);
$Password = mysqli_real_escape_string($con,$_POST['Password']);
$CPassword = mysqli_real_escape_string($con,$_POST['Cpass']);
if(empty($Username) || empty($Email) || empty($Password) || empty($CPassword))
{
echo 'Please fill all the fields';
}
if($CPassword != $Password)
{
echo 'Password not matching....!Try again!';
}
else
{
$Pass = $Password;
$sql = "insert into users (UName,Email,Password) values('$Username','$Email','$Pass')";
$result = mysqli_query($con,$sql);
if ($result)
{
echo 'Your record has been saved in the database';
}
else
{
echo 'Check your query';
}
}
}