-
Notifications
You must be signed in to change notification settings - Fork 0
/
DelSoln1.php
26 lines (23 loc) · 844 Bytes
/
DelSoln1.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
<?php
header('Content-Type: text/plain; charset=UTF-8');
$err = $_POST['SelError'];
$username = "root";
$password = "";
$hostname = "localhost";
$db="proj";
$dbhandle = mysqli_connect($hostname, $username, $password,$db)
or die("Unable to connect to MySQL");
mysqli_query($dbhandle,"SET NAMES 'utf8'");
$result=mysqli_query($dbhandle, "select errname from errdb");
while($row= mysqli_fetch_array($result))
{
$ges=$row['errname'];
echo $ges;
}
mysqli_query($dbhandle, "UPDATE err SET errorname = 'New Error' WHERE error = '$err';");
mysqli_query($dbhandle, "delete from sol where error='$err'");
//echo $ges;
mysqli_query($dbhandle, "delete from errdb where errname='$ges'");
mysqli_close($dbhandle);
header('Location: DelSoln.php');
?>