-
Notifications
You must be signed in to change notification settings - Fork 14
/
addvideos.php
79 lines (66 loc) · 1.96 KB
/
addvideos.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
<?php
session_start();
if ( $_SESSION[ "fidx" ] == "" || $_SESSION[ "fidx" ] == NULL ) {
header( 'Location:facultylogin' );
}
$userid = $_SESSION[ "fidx" ];
$fname = $_SESSION[ "fname" ];
?>
<?php include('fhead.php'); ?>
<div class="container">
<div class="row">
<div class="col-md-8">
<h3> Welcome Faculty : <a href="welcomefaculty.php" ><span style="color:#FF0004"> <?php echo $fname; ?></span></a> </h3>
<?PHP
include( "database.php" );
if ( isset( $_POST[ 'submit' ] ) ) {
$title = $_POST[ 'videotitle' ];
$v_url = $_POST[ 'VideoURL' ];
$v_info = $_POST[ 'Videoinfo' ];
$done = "
<center>
<div class='alert alert-success fade in __web-inspector-hide-shortcut__'' style='margin-top:10px;'>
<a href='#' class='close' data-dismiss='alert' aria-label='close' title='close'>×</a>
<strong><h3 style='margin-top: 10px;
margin-bottom: 10px;'> Video added Sucessfully.</h3>
</strong>
</div>
</center>
";
$sql = "INSERT INTO `Video` (`V_Title`, `V_Url`, `V_Remarks`) VALUES ('$title','$v_url','$v_info')";
//close the connection
mysqli_query( $connect, $sql );
echo $done;
}
?>
<fieldset>
<legend>Add Videos</legend>
<form action="" method="POST" name="AddAssessment">
<table class="table table-hover">
<tr>
<td><strong>Video Title </strong>
</td>
<td>
<input type="text" name="videotitle">
</td>
</tr>
<tr>
<td><strong>Video URL</strong> </td>
<td>
<textarea name="VideoURL" rows="1" cols="150"></textarea>
</td>
</tr>
<tr>
<td><strong>Video Description</strong> </td>
<td>
<textarea name="Videoinfo" rows="5" cols="150"></textarea>
</td>
</tr>
<td><button type="submit" name="submit" class="btn btn-primary">Add Video</button>
</td>
</table>
</form>
</fieldset>
</div>
</div>
<?php include('allfoot.php'); ?>