Newbie question!

Hi there,

So I have bought myself a PHP and flash book, only problem is that it uses php5 where I only have php4 on my server. I think I should be ok, I just need some help with the basics. Could someone tell me how to make this work on php4, I think the issue is the mysqli function. Also, if this script is on my server, should the hostname be local host?


$hostname = 'localhost';
$user = 'myusername';
$pass = 'mypassword'

$db = new mysqli($hostname, $user, $pass, 'phpflash');

$sql = 'SELECT * FROM wordlist';

$result = $db->query($sql);

$total = $result->num_rows;
echo "<h1>Total words: $total</h1>"