-
Notifications
You must be signed in to change notification settings - Fork 0
/
process_register.php
executable file
·63 lines (49 loc) · 1.4 KB
/
process_register.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
59
60
61
62
63
<?php
require('includes/config.php');
if(!empty($_POST))
{
$msg="";
if(empty($_POST['fnm']) || empty($_POST['unm']) || empty($_POST['gender']) || empty($_POST['pwd']) || empty($_POST['cpwd']) || empty($_POST['mail'])||empty($_POST['city']))
{
$msg.="<li>Please full fill all requirement";
}
if($_POST['pwd']!=$_POST['cpwd'])
{
$msg.="<li>Please Enter your Password Again.....";
}
if(!ereg("^[a-z0-9_]+[a-z0-9_.]*@[a-z0-9_-]+[a-z0-9_.-]*\.[a-z]{2,5}$",$_POST['mail']))
{
$msg.="<li>Please Enter Your Valid Email Address...";
}
if(strlen($_POST['pwd'])>10)
{
$msg.="<li>Please Enter Your Password in limited Format....";
}
if(is_numeric($_POST['fnm']))
{
$msg.="<li>Name must be in String Format...";
}
if($msg!="")
{
header("location:register.php?error=".$msg);
}
else
{
$fnm=$_POST['fnm'];
$unm=$_POST['unm'];
$pwd=$_POST['pwd'];
$gender=$_POST['gender'];
$email=$_POST['mail'];
$contact=$_POST['contact'];
$city=$_POST['city'];
$query="insert into user(u_fnm,u_unm,u_pwd,u_gender,u_email,u_contact,u_city)
values('$fnm','$unm','$pwd','$gender','$email','$contact','$city')";
mysqli_query($conn,$query) or die("Can't Execute Query...");
header("location:register.php?ok=1");
}
}
else
{
header("location:index.php");
}
?>