I have found in my Script this 2 Problems, SQL Injection and Cross-Site Scripting.
SQL Injection:
$cate = mysqli_real_escape_string($connection, @$_REQUEST['cat']);
$categ = mysqli_query($connection, "SELECT * FROM articles WHERE category='$cate'");
Where the category='$cate'
is the Problem.
XSS:
echo'<a href="../category/category.php?cat='.$id_c.'&pn=1" class="list-group-item">'.$catego.'</a>';
But i dont understand why is $cate
wrong?
Anyone an Example for the Correct solution?
Thanks all