-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudent_ins.php
More file actions
37 lines (34 loc) · 1.13 KB
/
Copy pathstudent_ins.php
File metadata and controls
37 lines (34 loc) · 1.13 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
<?php
include "connection.php";
if(isset($_REQUEST['btnsubmit']))
{
date_default_timezone_set('Asia/Kolkata');
$file=$_FILES['fileimg']['name'];
$ext=@end(explode(".",$file));
$dt=date("Y m d h i s A");
echo $f="Actor ".$dt.".".$ext;
$q="insert into student_master set
name='".$_REQUEST['txtsname']."',
email='".$_REQUEST['txtmail']."',
image='".$f."'
";
mysqli_query($cn,$q);
move_uploaded_file($_FILES['fileimg']['tmp_name'],"images/".$f);
header("location:student_disp.php");
}
?>
<html>
<head>
</head>
<body>
<form method="post" enctype="multipart/form-data">
Student Name : <input type="text" name="txtsname" required >
Email : <input type="email" name="txtmail" required >
image : <input type="file" name="fileimg" accept="image/*" required>
<input type="submit" name="btnsubmit">
<input type="reset" >
<input type="button" value="back">
<!-- <input type="button" onclick="javascript:history.go(-1);" value="back"> -->
</form>
</body>
</html>