Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('BASE_PATH', dirname(dirname(__FILE__)));
- define('APP_FOLDER','simpleadmin');
- require_once BASE_PATH.'/lib/MysqliDb.php';
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "gm";
- // create connection object
- $db =new MysqliDb($servername,$username,$password,$dbname);?>
- Fatal error: Call to undefined method MysqliDb::real_escape_string() in C:xampphtdocsGrovecus_register.php on line 11
- <?php
- require_once './config/config.php';
- $msg = "";
- use PHPMailerPHPMailerPHPMailer;
- if (isset($_POST['submit'])) {
- $f_name = $db->real_escape_string($_POST['f_name']);
- ^ in the line of code above is where the error comes
- function get_name($email_add) {
- global $conn;
- $sql = "SELECT * FROM tbl_customers WHERE email_add = '$email_add'";
- $result = $conn->query($sql);
- $row = $result->fetch_assoc();
- return $row["id"];//try to use id instead of f_name
- }
- <?php
- include 'Config.php'; //The file with that code
- //Code with $conn variable
- ?>
Add Comment
Please, Sign In to add comment