Yeah, sorry I’ll be clearer, as I said earlier there are 4 sources, SELECTS, that use the print program. So I’ve put an echo after all 4 just to check that there are no differences. Anyway, all echos are giving the correct info.
Oh and on what I would use Mysql, or Mysqli, i would use MYsqli… but a third option is PDO which is much better for me, and that is what I use. PDO creates a familiar API to access many popular databases. So with PDO you don’t use database specific functions like the mysql or mysqli style fuctions.
Correct me if I’m wrong:
The difference between the MYSQL functions and the MYSQLI functions are that the MYSQLI functions support more of the new features in mysql such as prepared statements. Mysqli was written to be an improved version of the mysql functions.
Another difference is that in the mysqli functions, you specify the database you want in the connection, whereas in mysql you choose the database with mysql_select_db().
That little feature makes mysqli a bit safer.
Are you sure that the query IS returning results on your remote server? I see an if, else based on $number (For that matter, why not just put the num_rows call in the searchresult.html.php file? $result will extend across the include)
If mysqli_num_rows returns 0, it means no rows have been selected.
Do an echo of the query in your code, and check if it is exactly as you expect it to be. Copy and paste it in PHPMyAdmin, and see if it gives any results there.
If the function isn’t supported, it would give an error, not 0.