-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.php
More file actions
56 lines (42 loc) · 976 Bytes
/
Copy pathsignup.php
File metadata and controls
56 lines (42 loc) · 976 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
session_start();
include('conn.php');
if(isset($_POST['signupbtn']))
{
$email=$_POST['email'];
$username=$_POST['user'];
$password=$_POST['pass'];
$cpassword=$_POST['cpass'];
$q="select * from slogin where email='$email'";
$q2 = mysqli_query($dbc,$q);
$q3 = mysqli_fetch_array($q2);
if($q3['email']!=$email)
{
if($password==$cpassword)
{
$password=md5($password);
$sql="INSERT INTO `slogin` (`id`, `email`, `username`, `password`) VALUES (NULL, '$email', '$username', '$password')";
mysqli_query($dbc,$sql);
$_SESSION['message']="Registration Successful";
$_SESSION['username']=$username;
echo "<script>
window.location.href='/aa/#pricing';
</script>";
}
else
{
echo "<script>
alert('Password do not match');
window.location.href='/aa/#features';
</script>";
}
}
else
{
echo "<script>
alert('Email Already Exist');
window.location.href='/aa/#features';
</script>";
}
}
?>