-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreg.php
More file actions
74 lines (72 loc) · 2.21 KB
/
reg.php
File metadata and controls
74 lines (72 loc) · 2.21 KB
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
<?php
include 'connect.php';
if(isset($_POST['sub'])){
$t=$_POST['text'];
$u=$_POST['user'];
$p=$_POST['pass'];
$c=$_POST['city'];
$g=$_POST['gen'];
if($_FILES['f1']['name']){
move_uploaded_file($_FILES['f1']['tmp_name'], "image/".$_FILES['f1']['name']);
$img="image/".$_FILES['f1']['name'];
}
$i="insert into reg(name,username,password,city,image,gender)value('$t','$u','$p','$c','$img','$g')";
mysqli_query($con, $i);
}
?>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<form method="POST" enctype="multipart/form-data">
<table>
<tr>
<td>
Name
<input type="text" name="text">
</td>
</tr>
<tr>
<td>
Username
<input type="text" name="user">
</td>
</tr>
<tr>
<td>
password
<input type="password" name="pass">
</td>
</tr>
<tr>
<td>
city
<select name="city">
<option value="">-select-</option>
<option value="knp">kanpur</option>
<option value="lko">lucknow</option>
</td>
</tr>
<tr>
<td>
Gender
<input type="radio"name="gen" id="gen" value="male">male
<input type="radio" name="gen" id="gen" value="female">female
</td>
</tr>
<tr>
<td>
Image
<input type="file" name="f1">
</td>
</tr>
<tr>
<td>
<input type="submit" value="submit" name="sub">
</td>
</tr>
</table>
</body>
</html>