Jump to content

Error code 403 when running Form validation example


tnesler

Recommended Posts

Hello!

 

I am trying to execute the example form validation form from the PHP tutorial. I copied the complete form to a file called Validate.Html

 

I am using Xampp as my PHP work area. Normally, putting the file in the HtDocs folder and then using localhost to run the file works fine. However, when I try to run this file, I get an error code 403 (Access forbidden). I think this is a problem with a setting in the http.conf file, but I don't know where it is.

 

The htDocs folder has this setting:

 

<Directory "C:/xampp/htdocs"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory>

 

Any suggestions on how to fix this?

 

Thanks in advance!

 

Tom Nesler

Link to comment
Share on other sites

Thanks for the tips. Changing the file extension fxed everything.

 

I am somewhat confused by the statement "Also, if you're trying to run PHP code, you should name it a .php file instead of .html."

 

I was under the opinion that websites used HTML files with embedded PHP rather than PHP files with HTML statements in them. If this is the case, then even if there is a single line of PHP code, then you use the PHP extension?

 

Thanks for your help!

 

Tom Nesler

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...