Jump to content

Recommended Posts

Hi everyone,

 

Just started posting here, hoping posting a problem wouldn't be my first post.

I just started to create a login page. When I attempt to login I get this:

 

" Fatal error: Maximum function nesting level of '100' reached, aborting! in C:\wamp\www\membership site\classes\Mysql.php on line 9 "

 

The code for the Mysql.php is:

<?php

 

require_once 'includes/constants.php';

 

class Mysql {

private $conn;

 

function __construct() {

$this->conn = new mysql(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or

  die('There was a problem connecting to the database.');

}

 

function verify_Username_and_Pass($un, $pwd) {

 

$query = "SELECT *

FROM users

WHERE username = ? AND password = ?

LIMIT 1";

 

if($stmt = $this->conn->prepare($query)) {

$stmt->bind_param('ss', $un, $pwd);

$stmt->execute();

 

if($stmt->fetch()) {

$stmt->close();

return true;

}

}

 

}

}

?>

 

Can anyone tell me what my issue is?

 

Thank you so much, all help would be appreciated! :)

Link to comment
https://forums.phpfreaks.com/topic/266423-line-issue/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.