Hello bastien,
I have installed PHP5 and MySQL and I have tested both of them and they run perfectly and smoothly. I have noticed when I change the extension of my HTML file (the first file in my posting) from HTML to PHP there is no problem and the file that I have my Form Tag in, sends the parameters (surename, firstname, phone) to the PHP file (the second file called example.8-2.php in my posting). The PHP file (example.8-2.php) establishes the connection and inserts the data into the MySQL with no problem. The problem arises when the extension of the first file is HTML.
I am under impression that my HTML file has be with HTML extension since that is going to be my welcoming page! On the other hand, it has no PHP script in it and I don’t see why it should be saved with a PHP extension file.
Base on the question “how are you accessing this page?” I noticed something interesting. These are my finding base on different way of accessing the file with extensions of HTML and PHP.
Accessing the file with HTML extension:
If I access the HTML file (index1.html) using the browser; the browser cannot display the page and the message I am getting is: The page cannot be displayed.
http://localhost/MyWeb/index1.html (The page cannot be displayed)
But if I simply double click on the HTML file that is going to open the file using the browser with no problem. Although the address that I am getting in the address field of the browser is different!
C:\Inetpub\wwwroot\MyWeb\index1.html (The page is displayed with no problem)
Accessing the file with PHP extension:
If I access the PHP file (index2.php) using the browser; the browser opens and displays my page but it is unable to show the images in the page and they are left out.
http://localhost/MyWeb/index2.php (page is opened with missing images)
Double clicking of the PHP file (index2.php) opens the notepad with the codes init (This is the only thing which makes sense! 😃)
I should also let you know that my entire files THML, PHP, and Images are in the same folder.
C:\Inetpub\wwwroot\MyWeb
Thank you for you time