Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// Check connection
if ($con->connect_error) {
die("Database Connection failed: " . $conn->connect_error);
die("Database Connection failed: " . $con->connect_error);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dzr201732120115 @Teecloudy

It is interesting. Thanks, @dzr201732120115 . Definitely we should use $con instead of $conn.

BTW, this file is different from the file I use on our server.

      1 <?php
      2 session_start();
      3
      4
      5
      6 $con=mysqli_connect("localhost","account_name","account_password","lrr");
      7 // Check connection
      8 if (mysqli_connect_errno())
      9   {
     10   echo "Failed to connect to MySQL: " . mysqli_connect_error();
     11   }
     12 else
     13 {
     14 echo "Connected";
     15 }

I think @Teecloudy has updated this file but I have not updated this file on the server.
Should I update Connect.php on the server, @Teecloudy ?

Hui

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spm2020spring

Yes the connect.php need to be updated with the same database details used in the Script.php line 13 to line 18.

Ashly

}
// else
// {
Expand Down
2 changes: 1 addition & 1 deletion Footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@


<br><br><br><br><br><br><br><br><br>
<div style="background-color:;width:100%di">
<div style="background-color:;width:100%">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dzr201732120115
@Teecloudy

Great fix.

Hui


</div>
4 changes: 2 additions & 2 deletions Script.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
header("Location: Admin.php");

} else {
echo "Error: " . $sql . "<br>" . $conn->error;
echo "Error: " . $sql . "<br>" . $con->error;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dzr201732120115 @Teecloudy

Great catch.

Hui

}
}

Expand Down Expand Up @@ -641,7 +641,7 @@ function Create_dir($upPath)
header("Location: Courses.php?course=".$url);

} else {
echo "Error: " . $sql . "<br>" . $conn->error;
echo "Error: " . $sql . "<br>" . $con->error;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dzr201732120115 @Teecloudy

Great.

Hui

}
}

Expand Down