Mexicano Mexicano
New member
Hello everyone, I am trying to make a connection to a database using php but I am not able to
basically I have a class called db_connect that is stored in root/includes/db_connect.php
after that I am testing with a file called db_connect_test.php stored at root/ classtest/db_connect_test.php however when parsing I get this error
Fatal error: Call to undefined function db_connect() in \classtest\db_connect_test.php on line 3
my code looks like this
<?php
require_once('../includes/db_connect.php');
$connection=new db_connect();
does anyone know what I am doing wrong?
this is messed up, thank you Liz for pointing that out, I just checked my class and had a little problem with the class name, heheheh
basically I have a class called db_connect that is stored in root/includes/db_connect.php
after that I am testing with a file called db_connect_test.php stored at root/ classtest/db_connect_test.php however when parsing I get this error
Fatal error: Call to undefined function db_connect() in \classtest\db_connect_test.php on line 3
my code looks like this
<?php
require_once('../includes/db_connect.php');
$connection=new db_connect();
does anyone know what I am doing wrong?
this is messed up, thank you Liz for pointing that out, I just checked my class and had a little problem with the class name, heheheh