Possible Duplicate:
PHP: “Notice: Undefined variable” and “Notice: Undefined index”
I need a really help since I could not find the problem in my coding. I have an included pagination.php file in cutomer.php file. The follwoing "Notice: Undefined variable: page in F:\wamp\www..." notice is continuously popping up in every single page where I have included. Please help me. Thank you!
<?php
$query = "SELECT COUNT(*) as num FROM $tableName";
$total_pages = mysql_fetch_array(mysql_query($query));
$total_pages = $total_pages['num'];
$stages = 3;
if(isset($_GET['page']))
$page = mysql_real_escape_string($_GET['page']);
if($page){ **//line 57**
$start = ($page - 1) * $limit;
}else{
$start = 0;
}
// Get page data
$query1 = "SELECT * FROM $tableName LIMIT $start, $limit";
$result = mysql_query($query1);
// Initial page num setup
if ($page == 0){$page = 1;} **//line 68**
$prev = $page - 1;
$next = $page + 1;
Notice: Undefined variable: page in F:\wamp\www\homepage\includes\pagination.php on line 57 Notice: Undefined variable: page in F:\wamp\www\homepage\includes\pagination.php on line 68