Matt's right. I admit to being lazy. Notices shouldn't be on (in my never humble opinion) on a live server. However, best practices being followed means it won't matter and that's what Matt is suggesting. PHP let's you do a lot without requiring academic-level formality, but with notices on, you are expected to be more rigorous. If I were you, I'd use Matt's code with 1 modification I'm sure he just overlooked:
PHP Code:
<?php $pagesize = 10; $start = (isset($_GET['start'])) ? (int)$_GET['start'] : 0; ?>
Then, everywhere else in your code, you'll want to be very careful about ensuring that you're abiding by all the best practices (no, I don't have a list  ).
Lazy 'ole me just turns off notices.
__________________
Jeremy Miller
Please login or register to view this content. Registration is FREE
|