-
Notifications
You must be signed in to change notification settings - Fork 1
/
regis.php
executable file
·77 lines (76 loc) · 2.36 KB
/
regis.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<?php
if(isset($_POST['save']))
{
$n=$_POST['n'];
$e=$_POST['e'];
$p=$_POST['p'];
$m=$_POST['m'];
$a=$_POST['a'];
$ff=$_POST['ff'];
if(file_exists('User_Data/$e'))
{
$msg="<font color='green' face='cursive'>User Already Exists</font>";
}
else
{
mkdir("User_Data/$e");
mkdir("User_Data/$e/inbox");
mkdir("User_Data/$e/sent");
mkdir("User_Data/$e/draft");
mkdir("User_Data/$e/spam");
mkdir("User_Data/$e/trash");
//mkdir("User_Data/$e/password");
move_uploaded_file($_FILES['img']['tmp_name'],"User_Data/$e/".$_FILES['img']['name']);
//echo $_FILES['img']['name'];
$fo=fopen("User_Data/$e/$p","w");
$fo1=fopen("User_Data/$e/profile","w");
$fm=fopen("User_Data/$e/$m","w");
$mm=fopen("User_Data/$e/$ff","w");
fwrite($fo1,"Name:$n Email:$e Password:$p Mobile:$m Address:$a");
}
}
?>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<table border="0" align="center" cellpadding="3">
<caption><h2>Hello!</h2></caption>
<form method="post" action="login.php"enctype="multipart/form-data">
<tr>
<td colspan="2"><?php echo @$msg;?></td>
</tr>
<tr>
<td>Your Name</td>
<td><input type="text" placeholder=" What's Your Name" name="n"></td>
</tr>
<tr>
<td>Your Email Id</td>
<td><input type="email" placeholder="[email protected]" name="e"></td>
</tr>
<tr>
<td>Your Password</td>
<td><input type="password" placeholder="Enter Your Password" name="p"></td>
</tr>
<tr>
<td>Your Mobile Number</td>
<td><input type="text" placeholder=" How'd we contact you" name="m"></td>
</tr>
<tr>
<td>Your Address</td>
<td><textarea placeholder=" Where do you put up" name="a"></textarea></td>
</tr>
<tr>
<td>Upload Your Image</td>
<td><input type="file" value="" name="img"/></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="Create" name="save">
<input type="reset" value="Reset"></td>
</tr>
</form>
</table>
</body>
</html>