-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUserRegistration.php
132 lines (123 loc) · 3.61 KB
/
UserRegistration.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--Developers:
Priyanka Nag (12030142001)
Raman -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="http://fonts.googleapis.com/css?family=Oswald" rel="stylesheet" type="text/css" />
<link href="default.css" rel="stylesheet" type="text/css" media="all" />
<style type="text/css">
<!--
.style4 {
color: #FFFFFF;
font-weight: bold;
font-size: 19px;
}
.style9 {color: #000000; font-size: 14px; }
.style11 {color: #000000}
.style12 {color: #FF0000}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<h3><a href="Login.php"><strong>Login</strong></a> </h3>
<div id="logo">
<h1><a href="index.html"><?php
$lines=file("config.inc");
echo $lines[0];
?></a></h1>
</div>
<div id="menu">
<ul>
<li><a href="ProjectDisplay.php">Home</a></li>
<li><a href="AddProject.php">Add a Project</a></li>
</ul>
</div>
</div>
<div id="page">
<div id="content">
<h2 class="title style11">Join the family </h2>
<h3>Enter your basic details here:</h3>
<br />
<div class="entry"></div>
</div>
<div class="post">
<!--Login info-->
<fieldset>
<?php
error_reporting(0);
if($_POST["UserName"]!=null && $_POST["Password"]!=null && $_POST["Name"]!=null && $_POST["emailid"]!=null && $_POST["areaofwork"]!=null)
{
$lines=file("config.inc");
$uname=trim(str_rot13($lines[2]));
$pwd=trim(str_rot13($lines[3]));
$username=$_POST["UserName"];
$password=$_POST["Password"];
$name=$_POST["Name"];
$emailid=$_POST["emailid"];
$designation=$_POST["designation"];
$areaofwork=$_POST["areaofwork"];
$con = mysql_connect($lines[5],$uname,$pwd);
mysql_select_db(trim(str_rot13($lines[1])));
$sql = "INSERT INTO USERS(uid,username,password,name,emailid,designation,areaofwork)
VALUES (NULL ,'$username','$password','$name','$emailid','$designation','$areaofwork'
);";
if(mysql_query($sql,$con))
{
echo "<h3><font color='red'>User Registered Successfully</font></h3>";
}
else
{
echo "<font color='red'>User Registration Failed</font>";
}
}
?>
<form action="UserRegistration.php" method="POST">
<table cellspacing="4px" width="735">
<tr>
<td>User Name:</td>
<td width="504"><input type="text" name="UserName" /></td></tr>
<tr>
<td>Enter your password: </td>
<td width="504"><input type="password" name="Password" /></td></tr>
<tr>
<td width="213">Re-enter your password:</td>
<td width="504"><input type="password" name="Re-password" /></td>
</tr>
<tr>
<td>Name:</td>
<td width="504"><input type="text" name="Name" /></td>
</tr>
<tr>
<td>Email ID:</td>
<td width="504"><input type="text" name="emailid" /></td></tr>
<tr>
<td>Designation </td>
<td>
<input type="radio" name="designation" value="Dev" checked="checked"/> Developer
<input type="radio" name="designation" value="Man" /> Manager</td>
</tr>
<tr>
<td>Area of work:</td>
<td width="504"><input type="text" name="areaofwork" /></td></tr>
<tr>
<td width="213"><input type="submit" value="Register"/> <input type="reset" value="Reset"/> </td>
</tr>
</table>
</fieldset>
</form>
</div>
</div>
</div>
<div id="footer">
<p>Designed and developed by Msc.CA (SICSR)</p>
</div>
</div>
</body>
</html>