Daney11 Posted February 19, 2008 Share Posted February 19, 2008 How do i stop this http://www.mysite.com/news.php?id=1 http://www.mysite.com/news.php?id[] <----- im using $_GET and if i enter this my page breaks etc. Link to comment https://forums.phpfreaks.com/topic/91869-array/ Share on other sites More sharing options...
kenrbnsn Posted February 19, 2008 Share Posted February 19, 2008 You could use a simple test like: <?php if (isset($_GET['id']) && is_array($_GET['id'])) { // // reject -- invalid // } ?> Ken Link to comment https://forums.phpfreaks.com/topic/91869-array/#findComment-470510 Share on other sites More sharing options...
kenrbnsn Posted February 19, 2008 Share Posted February 19, 2008 I moved this from the "Beta test section", not realizing the OP already posted here. Locked. Link to comment https://forums.phpfreaks.com/topic/91869-array/#findComment-470512 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.