Website won't recognize my .php file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Drastic2014
    New Member
    • Aug 2010
    • 3

    #1

    Website won't recognize my .php file?

    Hey guys,

    I am a noobie when it comes to PHP. Basically I just got done installing Apache, PHP, and MySQL. Now I am testing my PHP with a simple "contact us" form. I coded a simple html file to prompt a user for their name and password, and then the <form action="step2.p hp"> should be what is displayed once they hit submit (in this case I have the .php file displaying what they put into the input boxes). However, once I hit submit, it just displays "No webpage was found for the web address: step2.php". What have I done wrong?

    Thanks,
    Chase!
  • Drastic2014
    New Member
    • Aug 2010
    • 3

    #2
    So I have done some research and it appears it is because the URL is:

    file:///C:/Websites/step1.html

    and not:



    or such. How is this fixed?

    Comment

    • johny10151981
      Top Contributor
      • Jan 2010
      • 1059

      #3
      when you use
      file:///C:/Websites/step1.html you are just accessing local files. local file always get treated as html file.

      copy you step1.html file in your site root directory.

      and also copy the the action file in the same directory
      then open browser and type
      http://localhost/step1.html
      then try testing your pages

      Comment

      • Drastic2014
        New Member
        • Aug 2010
        • 3

        #4
        Thanks Johny! It worked perfectly after that.

        Comment

        Working...