-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathvid.php
More file actions
51 lines (47 loc) · 1.16 KB
/
vid.php
File metadata and controls
51 lines (47 loc) · 1.16 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
<?php
$server="localhost";
$user="root";
$pass="";
$db="signupusers";
$conn=mysqli_connect("$server","$user","$pass","$db");
$m=$_POST['m'];
$t=$_POST['t'];
$w=$_POST['w'];
$th=$_POST['th'];
$f=$_POST['f'];
$sub=$_POST['subject'];
$trun="DELETE FROM videos WHERE subject='$sub'";
$sql="INSERT INTO videos(subject,monday,tuesday,wednesday,thursday,friday) VALUES('$sub','$m','$t','$w','$th','$f')";
mysqli_query($conn,$trun);
mysqli_query($conn,$sql);
echo $trun;
echo $sql;
if($conn)
{
echo '<!DOCTYPE html>
<html>
<head>
<script>
alert("Values Entered");
window.location="addvid.php";
</script>
</head>
<body>
</body>
</html>';
}
else
{
echo '<!DOCTYPE html>
<html>
<head>
<script>
alert("Values Not Entered");
window.location="addvid.php";
</script>
</head>
<body>
</body>
</html>';
}
?>