Skip to content

Debug.fix obvious bug.DaiZerong 201732120115#25

Open
CODZR wants to merge 1 commit intomasterfrom
Dai-Bugfix
Open

Debug.fix obvious bug.DaiZerong 201732120115#25
CODZR wants to merge 1 commit intomasterfrom
Dai-Bugfix

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

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


<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


} 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


} 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