The first PHP program after the PHP environment is set up

Source: Internet
Author: User
Tags php form
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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.