[PHP] Is this possible

LMC

Experienced Elementalist
Joined
Apr 13, 2009
Messages
247
Reaction score
95
Hi all,

ive just made a simple news system in php for a friend... Ive made a page where you can veiw or edit exsisting news articles. Basically you go on to a page where it lists all news articles, then yo can click on the one you want and it will load the article in to forms on a new page where you can edit it and then save it again. The link is basically "manage_news.php?id=IDHERE" in the browser when you edit a article. But if you wanted you could just enter "manage_news.php" and it would still show the pages but the forms would be blank. Is there anyway to block this "manage_news.php" and only allow "manage_news.php?ID=IDHERE".
if it dont make sence, sorry. i tried my best.
Ge me? Thanks.
 
PHP:
<?php
if(!$_GET['id'])
{
 die;
}

what I want it to do is not allow you on the page if there is no id.

EDIT: Thanks for the help James, ive got it working now. Thank you merlin for also helping out.
 
Last edited:
Back