When I first started PHP, I used wampserver, and then I could write the. PHP file.
For example, you can write the. php file and enter "localhost/a. php" in the browser to run properly.
But I want to follow the example on w3cschool:
Create an html file as follows:
Create a php file as follows:
Welcome
Your email address is:
I put them in my www Directory. when I open the html file, enter the form and click the sumbit button.
File: // C:/wamp/www/php/welcome. php
The transfer information is not displayed. If I manually go to localhost/php/welcome. php, an error is reported indicating that the variable does not exist (this must be because it is not passed in ). I don't know how to redirect him to the correct localhost?
How can we ensure that data is correctly transmitted between html files and PHP files? Thank you!
Reply to discussion (solution)
Name:
E-mail:
The above code is changed:
Name:
E-mail:
Look
File: // C:/wamp/www/php/welcome. php ???
You opened your html file in a browser on the desktop?
Enter localhost/php/your html file in the address bar of your browser.
Access to html pages is the same as access to php pages. http: // localhost/xx.html is used instead of double-clicking
Could you open it with IE?
File: // C:/wamp/www/php/welcome. php ???
You opened your html file in a browser on the desktop?
Enter localhost/php/your html file in the address bar of your browser.
You need to use localhost to open it ~