-
Notifications
You must be signed in to change notification settings - Fork 0
/
reset.php
29 lines (26 loc) · 919 Bytes
/
reset.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
<?php
session_start();
$tid=$_SESSION['username'];
$connection= mysqli_connect('localhost','root','');
$db=mysqli_select_db($connection,'faculty');
$new=4;
$final="delete from timetable where tid='$tid'";
if(mysqli_query($connection,$final))
{ echo "Timetabe Deleted";
}
$connection= mysqli_connect('localhost','root','');
$db=mysqli_select_db($connection,'minor');
$final="update faculty set c1='$new' where username='$tid'";
if(mysqli_query($connection,$final))
echo "S1";
$final="select Subject2 from faculty where username='$tid'";
$q=mysqli_query($connection,$final);
while($row = mysqli_fetch_assoc($q))
{
$tem=$row["Subject2"];
}
if($tem!="")
$final="update faculty set c2='$new' where username='$tid'";
$q=mysqli_query($connection,$final);
header('Location:tt.php');
?>