-
Notifications
You must be signed in to change notification settings - Fork 2
/
register.php
83 lines (79 loc) · 2.2 KB
/
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
error_reporting(0);
session_start();
if($_SESSION['login']!=1)
{
$data='
<html>
<head>
<title>Welcome | Registeration</title>
</head>
<body>';
$data .=
'<form action="send.php?type=' . $_GET['type'] . '&status=sent" method="post">
<fieldset>
<legend>Your Data</legend>
<p><label for="fname">Name:</label><input type="text" id="fname" name="fname" placeholder="First Name"/>
<input type="text" id="mname" name="mname" placeholder="Middle Name"/>
<input type="text" id="lname" name="lname" placeholder="Last Name"/></p>
<p><label for="dob">Date of Birth :</label><input type="date" id="dob" name="dob"/></p>
<p><label for="email">E-mail :</label><input type="email" id="email" name="email"/></p>
<p><label for="gender">Gender :</label>
<select name="gender" id="gender">
<option>---Select---</option>
<option value="M">Male</option>
<option value="F">Female</option>
</select></p>
<label for="add">Address : </label>
<textarea rows="4" cols="30" id="add" name="add">
</textarea>
</fieldset>
<fieldset>
<legend>
Login Credentials
</legend>
<p><i>*below data is important for future login....</i></p>
<p><label for="username">Username</label><input type="text" placeholder="enter username" id="username" name="uname" autocomplete="off"/></p>
<p><label for="pass">Password</label><input type="password" id="pass" name="password" autocomplete="off"/></p>
</fieldset>
<input type="reset" value="clear"/> <input type="submit" name="submit"/>
</form>
</body>
</html>';
$reg='
<html>
<head>
<title>Welcome | Registeration</title>
</head>
<body>
<form action="?" method="post">
<fieldset>
<legend>Registeration Type</legend>
<p><a href="register.php?type=free">Free Registeration</a></p>
<p><a href="register.php?type=premium">Premium Registeration</a></p>
</fieldset>
</form>
</body>
</html>
';
if(!isset($_GET['type']))
{
echo $reg;
}
else
{
$type=$_GET['type'];
if($type=='premium' || $type=='free')
echo $data;
else
{
header("Location:register.php?try=false");
exit();
}
}
}
else
{
echo 'you are already logged in';
}
?>