You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
die("<li class=\"cross\">Connection Failed. Check the configuration file.".mysql_error()."</li>");
44
+
if($conn->connect_errno > 0){
45
+
die("<li class=\"cross\">Connection Failed. Check the configuration file.".$conn->connect_error."</li>");
47
46
}else{
48
47
//connection successfull.
48
+
49
49
cleanup($conn,$XVWA_WEBROOT);
50
50
echo"<li class=\"tick\">Connected to database sucessfully.</li>";
51
51
// creating comment tables
52
-
$table_comment=mysql_query('CREATE TABLE comments(id int not null primary key auto_increment,user varchar(30),comment varchar(100),date varchar(30))');
52
+
$table_comment=$conn->query('CREATE TABLE comments(id int not null primary key auto_increment,user varchar(30),comment varchar(100),date varchar(30))');
53
53
if($table_comment){
54
-
$insert_comment=mysql_query('INSERT INTO comments (id,user,comment,date) VALUES (\'1\', \'admin\', \'Keep posting your comments here \', \'10 Aug 2015\');');
54
+
$insert_comment=$conn->query('INSERT INTO comments (id,user,comment,date) VALUES (\'1\', \'admin\', \'Keep posting your comments here \', \'10 Aug 2015\');');
File inclusion is an attack that would allow an attacker to access unintended files on the server. This vulnerability exploits application’s functionality to include dynamic files. Two categories in this attack are Local File Inclusion (LFI) and Remote File Inclusion (RFI).
0 commit comments