Open
Conversation
| // Check connection | ||
| if ($con->connect_error) { | ||
| die("Database Connection failed: " . $conn->connect_error); | ||
| die("Database Connection failed: " . $con->connect_error); |
Member
There was a problem hiding this comment.
@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
Contributor
There was a problem hiding this comment.
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%"> |
Member
There was a problem hiding this comment.
|
|
||
| } else { | ||
| echo "Error: " . $sql . "<br>" . $conn->error; | ||
| echo "Error: " . $sql . "<br>" . $con->error; |
Member
There was a problem hiding this comment.
|
|
||
| } else { | ||
| echo "Error: " . $sql . "<br>" . $conn->error; | ||
| echo "Error: " . $sql . "<br>" . $con->error; |
Member
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
已修改: conn->con width:100%di ->width:100%
仍然有两处bug不知道怎么改

Header.php Line135,139
Course.php Line312