I've looked through this and personally can't see any security issues, I've tried plenty of ? in the browser for the $_GET[] command, can't get anything not to work. Any security suggestions anyone?
<?php
// Initial requested files
include("config.inc.php");
// Initial requested HTTP Post Vars
if(!$_GET['name']) {
header("location: $weburl"); }
else {
$selection = "option";
$name = $_GET['name']; }
switch ($selection) {
case option:
if(!$_GET['page']) {
$page = "1"; }
else {
$page = $_GET['page']; }
$sqlq = "SELECT name FROM articles WHERE name='$name'";
$sqlr = mysql_query($sqlq) or die(mysql_error());
$sqlc = mysql_num_rows($sqlr);
$numpage = $page+1;
if($page == $sqlc) {
$url = $weburl."articles.php?name=$name&page=$page"; }
else {
$url = $weburl."articles.php?name=$name&page=$numpage"; }
$hfer = "You're currently on page $page of $sqlc.
Click <a href=\"$url\">here</a> to go to the next page.";
$sqlpageone = $page-1;
$sqlpageten = $page+9;
$sqlq = "SELECT title,article,writer,type,image,alt,keywords FROM articles
WHERE name='$name' AND page='$page'";
$sqlr = mysql_query($sqlq) or die(mysql_error());
while($sqla = mysql_fetch_array($sqlr)) {
$title = $sqla['title'];
$article = $sqla['article'];
$writer = $sqla['writer'];
$type = $sqla['type'];
$image = $sqla['image'];
$alt = $sqla['alt'];
$keywords = $sqla['keywords'];
$imagesrc = $weburl."images/$type/".$image;
$catlisting .= "<tr><td align=\"center\" class=\"main\">";
$catlisting .= "<img src=\"$imagesrc\" style=\"border:0;\" alt=\"$alt\" />";
$catlisting .= "$article";
$catlisting .= "</td></tr>";
} mysql_free_result($sqlr);
$body = "<tr><td align=\"center\" class=\"title\">$title</td></tr>$catlisting<tr>
<td align=\"center\" class=\"main\">$hfer</td></tr>";
}
$title = "$title";
include("./end.php");
Thanks,
Chris