The first PHP program established in the PHP environment by Qing Jun
I wrote this article to myself. This problem has been entangled for a long time. I am a super beginner in php;
I copied an xampp file from my classmates and installed it to develop PHP. my default localhost directory is:C: \ xampp \ htdocs
Note the following when submitting a php form:
You cannot directly click HTML to open the page. without the http: // localhost prefix, you cannot submit the HTML document to the PHP document correctly.
Here, you must put all HTML and PHP under your localhost Directory (which can be under the subdirectory ).
For example, I created a php folder in the default directory ~~~
Then, I have 2 files in this folder, 1.html and 1.php.
Note: when accessing html, enter the following xxxxxxx in the address bar. (You cannot directly click 1.html to open the webpage ).
Hey hey, click submit and then interact with php ..........
I have compiled a small program for php processing to submit data on a webpage;
1. HTML code
HTML form
2. php code
Hello everyone, I am
!
"?> I'm from
.
Address: http://blog.csdn.net/qingdujun/article/details/41577327
References: Edited by Chen Hao, no-basic PHP learning (version 3rd)