Jump to content
Larry Ullman's Book Forums

Chapter 18 - Issue With Login Script


Recommended Posts

We have used the login script from chapter 18 successfully numerous times however we are now having an issue with a server that is running php 5.3.3. It seems to be skipping over this section:

	if ($e && $p) { // If everything's OK.

We just get a "Please try again" error. 

Link to comment
Share on other sites

It seems to be losing the variables and when we echo the query the username and password fields are empty. In addition, we are getting the following error:

Undefined variable: dbc in login.php on line 90 Warning: mysqli_close() expects parameter 1 to be resource, null given in /login_content.php on line 90

 
Link to comment
Share on other sites

First of all, please try to be patient. I understand this isn't working for you and that's stressful, but this forum relies upon free help from strangers, so it may take a day or two or three or... to get an answer. I personally check the forums 3 times per week, which I'm still doing this week, even though I'm on vacation.

 

As for your problem, it sounds like you have a database issue. That's what this error indicates: 

Warning: mysqli_close() expects parameter 1 to be resource, null given in /login_content.php on line 90

You should apply the standard PHP-MySQL debugging techniques to figure out what query is failing and why. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...