Hello.
I wonder if someone could tell me whether the below is ok, can you suggest ways I can improve the PHP security wise or suchlike, or do you think it’s ok?
It works perfect, I’m just wondering if anyone had any security comments or any suchthing.
Any help would be much appreciated!!!
Here’s the code:
[code=php]<?php
include(‘../header.php’);
?>
<table style=”text-align: center; margin-left: auto; margin-right: auto; border: 0px;” cellspacing=”0″ cellpadding=”0″>
<tr>
<td><b>Please click on a Question:</b></td>
</tr>
<tr>
<td>
<br />
<p>The questions.</p>
<br />
</td>
</tr>
<tr>
<td><b>The Answer:</b></td>
</tr>
<tr>
<td><br />
<?php
$id = (int)$_GET[‘id’];
if ($id <= 14 && $id >= 1) {
$info = “/home/LAN/public_html/faq/answers/$id.html”;
if (file_exists($info)) {
require($info);
} else {
echo “Sorry, that answer doesn’t exist. Please try again.”;
}
}
?>
<br /></td>
</tr>
</table>
<?php
include(‘../footer.php’);
?>
Thanks in advance.
Regards,