403 "Forbidden" error despite not using "include/require?"

Username (e.g. epiz_XXX) or Website URL

epiz_32901841

Error Message

403 Forbidden

Server or website configuration is blocking you from viewing this page

Other Information

For a bit of context: I am getting this error upon clicking a hyperlink in my site that is meant to delete data from a table in a PHP Database. in my deletion script, I did not use any chat scripts, nor did i use include or require, so i am unsure as to why this is not working.
If needed, I can post my code in a follow up reply.

Are you able to ftp to your hosting account using Filezilla?

2 Likes

Yes, I am able to connect to my database just fine now, but I think it might be something up with my code.
For reference: here is my “delete from database” code:

<html>
<body>
<?
        $servername = "sql200.epizy.com";
        $username = "epiz_32901841";
        $password = "Password";
        $dbname = "epiz_32901841_database2";
        
        $db = new mysqli($servername, $username, $password, $dbname);
        if ($db->connect_error)
        {
            die("Connection failed: " . $db->connect_error);
        }

$gameid=$_GET['rn'];
$query = "DELETE FROM titles WHERE gameid = '$gameid'";

$result=mysqli_query($db,$query);
if ($result)
{
    echo "Game deleted from the database!";
}
else
{
    echo "Game not deleted. Please try again."
}
?>

</body>
</html>

It seems you’ve accidentally included your password in this file, please delete it and ensure it’s been changed.

2 Likes

“include” and IIRC “require” are keywords that will always return a 403 in the browser, but will work correctly if included or required from another file, not in those directories.

See this:

5 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.