-
Notifications
You must be signed in to change notification settings - Fork 0
/
welcome.php
112 lines (81 loc) · 2.54 KB
/
welcome.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
<?php
session_start();
$email=$_SESSION['email'];
$name=$_REQUEST['name'];
$cn=$_REQUEST['cn'];
$branch=$_REQUEST['branch'];
$fonno=$_REQUEST['fonno'];
$role=$_REQUEST['role'];
if($_REQUEST['submit'])
{
if($name==NULL or $cn==NULL or $branch==NULL or $fonno==NULL)
{
$err="Please fill all the information";
}
else
{
include("database.php");
$q="insert into profile values('','$name','$cn','$branch','$fonno','$role','$email')";
mysql_query($q);
$fname=$_FILES['upload_image'];
move_uploaded_file("$fname[tmp_name]","image/$fname[name]");
$q1="insert into pic values('','$fname[name]')";
mysql_query($q1);
header("Location: /ccs/thankyou.php");
}
}
?><!DOCTYPE html>
<html lang="en">
<?php include("title.php"); ?>
<body>
<div class="container-fluid">
<?php include("header.php"); ?>
<div class="row">
<div class="col-xs-12 welcomepage">
<h1 class="text-center "> Profile Details </h1>
<form role="form" method="post" enctype="multipart/form-data">
<div class="form-group">
<label for="name">Your Name:</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Your Name">
</div>
<div class="form-group">
<label for="cn">College Name:</label>
<input type="text" class="form-control" id="cn" name="cn" placeholder="College Name">
</div>
<div class="form-group">
<label for="branch">Branch:</label>
<input type="text" class="form-control" id="branch" name="branch" placeholder="Branch">
</div>
<div class="form-group">
<p id="add_photo">
<label >
<span>
Photo For Your Profile:
</span>
<span>
<input type="file" id="upload_image" name="upload_image" > <br>
</span>
</label>
</p>
</div>
<div class="form-group">
<label for="fonno">Phone No:</label>
<input type="text" class="form-control" id="fonno" name="fonno" placeholder="Phone No.">
</div>
<div class="form-group">
<label for="role">Your Role:</label>
<select class="form-control" id="role" name="role">
<option selected="selected">-Choose From Drop Down-</option>
<option>Student</option>
<option>Faculty</option>
</select>
</div>
<span class="err"><?php echo $err; ?></span><br>
<input type="submit" name="submit" id="submit" />
</form>
</div>
</div>
<?php include("footer.php"); ?>
</div>
</body>
</html>