-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.php
106 lines (69 loc) · 2.8 KB
/
check.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>User Registration</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
.error {color: #FF0000;}
</style>
</head>
<body>
<?php include('navbar.php'); ?>
<?php
if(isset($_POST["submit"]))
{
//$username=$_POST['username'];
$file=$_FILES['file'];
// echo $username;
echo $file;
// $proImage=$_FILES['file']['name'];
// $fileTmpName=$_FILES['file']['tmp_name'];
// $imageSize=$_FILES['file']['size'];
// $fileExt=explode(".", $proImage);
// $fileActualExt=strtolower(end($fileExt));
// $valitExt=array('jpg','jpeg','png','gif');
// if(in_array($fileActualExt, $valitExt)){
// if($imageSize < 200000){
// $newImageName=$username.".".$fileActualExt;
// $fileDes='proimage/'.$newImageName;
// move_uploaded_file($fileTmpName, $fileDes);
// }
// else{
// echo "<script> alert('Image size is too big.')</script>";
// }
// }
// else{
// echo "<script> alert('Please, Upload valid image formate.')</script>";
// }
}
?>
<div class="container">
<h1 class="well">User Registration Form</h1>
<div class="col-lg-12 well">
<div class="row">
<form action="#" method="post">
<div class="col-sm-12">
<div class="form-group">
<label>Username</label><span class="error">*</span>
<input type="text" placeholder="Enter Username Here.." class="form-control"
name="username" required>
</div>
<div class="form-group">
<label>Profile Picture</label><span class="error">* (jpg, jpeg, png, gif)</span>
<input type="file" class="form-control" name="file" >
</div>
<input type="checkbox" value="" name="check1" required> I agree to the Jobsite.com <font color="blue" > Terms of use.</font><br><br>
<!-- <input type="checkbox" value="" name="check2"> Subscribe to Jobsite Newsletter. <br><br> -->
<button type="submit" class="btn btn-primary" name="submit">Submit</button>     
<button type="reset" class="btn btn-danger" name="reset">Reset</button>
</div>
</form>
</div>
</div>
</div>
</body>
</html>