chingching Posted March 17, 2007 Share Posted March 17, 2007 Hello, I have some code with a problem. The code is: 1. <?php 2. $initStartLimit = 0; 3. $limitPerPage = 10; 4. $startLimit = $_REQUEST['startLimit']; 5. $numberOfRows = $_REQUEST['rows']; 6. $sortBy = $_REQUEST['sortBy']; 7. $sortOrder = $_REQUEST['sortOrder']; The errors starts with row 4: Notice: Undefined index: startLimit in *** on line ** Notice: Undefined index: rows in *** on line ** Notice: Undefined index: sortBy *** Notice: Undefined index: sortOrder in *** The code was created by "phpCodeGenie" and works fine on my webserver, which has php version 4.4.4 and mySql version 4.1.21 I just installed easyPHP on my home computer which has php version 4.3.10 mySql version 4.1.9 The errors only show up on easyPHP. My guess is that phpCodeGenie defined these indexes. How can I define them in EasyPHP ? Thank you All. Link to comment https://forums.phpfreaks.com/topic/43079-undefined-index/ Share on other sites More sharing options...
cshireman Posted March 17, 2007 Share Posted March 17, 2007 The indexes that are missing need to be in the parameters of the URL that is used to call this page. ex: http://mydomain.com/search.php?startLimit=1&rows=20&sortBy=Name&sortOrder=asc Link to comment https://forums.phpfreaks.com/topic/43079-undefined-index/#findComment-209265 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.