Jump to content

[SOLVED] Teach me a thing or two about PHP security?


unsider

Recommended Posts

<?php
if(isset($_GET['aid'])){
$article = $_GET['aid'];
  switch ($article) {
    case "{$_GET['aid']}":
      article();
      break;
   Default;
        break;
}
?>

 

Can someone show me the proper way to completely secure this piece of code, I know a little bit about security, but now that I'm taking this stuff a little more serious I'm starting to read some books, which by the way, if there is a MUST read security book out there, let me know :)

 

Thanks.

 

EDIT: an error, and a little easier on the eyes.

you are already on the MUST be forum, can't believe you missed this great article: http://www.phpfreaks.com/tutorial/php-security

]

 

Ahh this is the second time I've missed a tutorial on the main page.

 

Sorry bout that.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.