User:Php-programing

Lets start by looking at the guestbook program as an example. The very first line of code <? tells the server to enter PHP mode. The next line /* should look familiar to any Perl, C or Java programmers out there as the beginning of a comment. That kind of comment will run until it hits a */ This next section of code demonstrates a second kind of comment that PHP shares with C++, Perl and Javascript. Any line that starts with // is taken as a comment. php programing The next line of actual PHP code tests to see if this page is being loaded as a HTTP POST query. When HTML forms are processed, they can either put data to the server using the GET method or the POST method. GET is the one that puts a ? after the page followed by a string of key=value pairs. POST methods hide the data being input by listing it is a special environment variable called HTTP_POST_VARS. If we are posting, this is the beginning of how we put data into the database.