Author Topic: Include a PHP file  (Read 3534 times)

Offline largan

  • Newbie
  • *
  • Posts: 7
Include a PHP file
« on: November 25, 2007, 06:27:15 AM »
Hello All,

I am trying to include a php file but somehow it does not work, even if I put it like this.

include "myfilename.php";
?>


In fact I am trying to create a predefined address book, with all the users that have already logged in into the webmail.
I can easily get the information from the database using the following query:

$sql = 'SELECT * FROM `users` ORDER BY `username` DESC LIMIT 0, 100';
$result_sq = mysql_query($sql);

but I am having troubles including it into the webmail.

If I call the file directly it shows the list of users with no problem.

So, any help would be much appreciated.

Thanks in advnace.

Offline bristophocles

  • Newbie
  • *
  • Posts: 2
Re: Include a PHP file
« Reply #1 on: February 19, 2008, 11:36:59 AM »
What are you then doing with $result_sql exactly after the query returns?