Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8501929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:20:49+00:00 2026-06-11T01:20:49+00:00

Any file linked from the form in the code below causes the page to

  • 0

Any file linked from the form in the code below causes the page to throw out this error:

Forbidden

You don’t have permission to access /savetodb.php on this server.

Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.

Code:

<div id="form">
<?php
$result = mysql_query("SELECT * FROM textdb WHERE id=1") 
or die(mysql_error());  
$fields = mysql_fetch_assoc($result);
?>
<form action="savetodb.php" method="post">
<p><a href="#">Text from DB One</a><br></p>
<br /><?php echo"<input name=\"one\" type=\"text\" id=\"one\" value=\"" .$fields['one']. "\"/>"; ?>
<br /><br />
<p><a href="#">Text from DB 2</a><br></p><br />
  <?php echo"<input name=\"two\" type=\"text\" id=\"two\" value=\"" .$fields['two']. "\">"; ?>
<br /><br />
<p><a href="#">Text from DB 3</a><br></p><br /><?php echo"<input name=\"three\" type=\"text\" id=\"three\" value=\"" .$fields['three']. "\">"; ?>
<br /><br />
<input name="submit" type="submit" value="Save"></form>
</div>

Have I missed something in the code that could be causing this? The files permissions are set to 655 (the default for my server, 777 isn’t allowed).

The form imports data from the database in to editable fields, then when you click save, it should save that info back to the database. When you click save, the browser gives you the Forbidden error.

Please don’t point out I should be using PDO statement, I’m still learning :/

The problem is not with the code, but with a server plugin called modsecurity. It has been disabled by my host now and works perfectly! If you are getting similar errors please contact your host, to save you a few days of trouble shooting!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:20:50+00:00Added an answer on June 11, 2026 at 1:20 am

    Sorry guys, it was a problem with modsecurity as there is HTML in the form, it was blocking the file from working.

    Very odd problem which my host hast fixed now.

    I’ll leave this here in case anyone in future is experiencing the same problems. Thanks for your help!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Visual Studio when I linked a file from one project to the next,
I have an application that reads a linked list 1 from a file when
Is it possible from a Javascript code to find out where it came from?
I have retrieved data from a 2-column CSV file using HashMap. This is for
This is a question which isn't linked to any practical situation I'm in, but
I'm basically trying to create a linked list from a text file and add
I can't store any file in NSTemporaryDirectory subfolders rootDirectoryName is GUID subDirectoryName is also
When I upload any file everything looks good. I have those pictures in pics
How do you get any file's last modified date using VB6?
If I upload any file in the JSP then how i know the full

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.