I have a couple of questions here, so any help will be greatly appreciated. I have three pages here. 

```
//Page 1 - Constants

$dbhost = "database.url.com";  //Just made up
$dbname = "dbname";
$dbuser = "dbuser";
$dbpass = "123456";

//Page 2 - The Function

//This is where i need to write the function select information from the database.

include ("include/page1.php");
$DBH = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
function selectInfo(){
$stmt = $DBH->prepare("SELECT * FROM information LIMIT ?,?");
}
//This function obviously is not complete because I keep recieving different error messages. I guess i cannot figure out how to write a prepared select statement. Need some help here.

//Page 3 - Where the function is called and where the user would be
 include ("include/page2.php");

//need to be able to call the function here with variables set.

$start = 0;
$end = 5;
selectInfo();
echo the data that i need in the database.

```

This probably looks like a complete mess, but hopefully you can get the idea i am trying to do here. I would like to be able to fetch the data so that i can display it something like 

```
echo $stmt->title;
echo $stmt->id;

```

if that is possible. Can anyone please help me?