I want to change from mysql to mysqli here is how I organized my code:
connection.php
[php]
$host = mysql_connect(‘localhost’, ‘user’, ‘password’);
$db = mysql_select_db(‘db’);
[/php]
functions.php
[php]
function name(){
}
[/php]
header.php
[php]
require(‘connection.php’);
require_once(‘functions.php’);
[/php]
This is how I do it but to do it with mysqli its a bit complicated for me.Even though I have tried mysqli and used it I found it hard to organise.
How did you do it ? and what do you suggest for me ?
p.s:I know some of you will say PDO but thats complicated for me right now