# Newbie question!

**URL:** <https://forum.kirupa.com/t/newbie-question/245979>\
**Category:** Uncategorized\
**Created:** [December 6, 2007, 1:22am UTC](https://forum.kirupa.com/t/newbie-question/245979 "2007-12-06T01:22:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theSchtickler](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@theSchtickler](https://forum.kirupa.com/u/theSchtickler)\
**Post date:** [December 6, 2007, 1:22am UTC](https://forum.kirupa.com/t/newbie-question/245979/1 "2007-12-06T01:22:57Z")

</div>

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?

```php
<?php

$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>"

$db->close();
?>

```
