Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug.fix obvious bug.DaiZerong 201732120115 #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

CODZR
Copy link
Contributor

@CODZR CODZR commented Apr 13, 2020

已修改: conn->con width:100%di ->width:100%

仍然有两处bug不知道怎么改
image
Header.php Line135,139

image
Course.php Line312

@@ -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
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
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

@@ -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
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

@@ -396,7 +396,7 @@
header("Location: Admin.php");

} else {
echo "Error: " . $sql . "<br>" . $conn->error;
echo "Error: " . $sql . "<br>" . $con->error;
Copy link
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

@@ -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
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants