php inexes and variables
Posted on 2006-06-15
I want to set a page number of a page
$page =$_REQUEST['page'] + 1;
echo "page is ".$page; // this echos out page is 1
The problem is when I try and use $page further down in the body $page is 0
Question <?=$page; ?> <BR />
<? echo "page is".$page; ?>
I also get an undefined index notice
Notice: Undefined index: page in c:\Inetpub\wwwroot\lss\module_one\evaluation.php on line 8
page is 1
but I though if I do a if(!isset($_REQUEST['page'])) this is the way to set a previously undefined index?
I need to know how to defined indexes and then convert them into variables that I can use.