Php Class For Beginners. Question Will Be Treated With High Priority.

Discussion in 'DELETED POSTS' started by Anonymous, Oct 1, 2010.

Users Viewing Thread (Users: 0, Guests: 0)

    Anonymous Guest

    Member Since:
    Lets Start

    What Is PHP
    PHP is a programming language that was designed for creating dynamic websites. It slots into your web server and processes instructions contained in a web page before that page is sent through to your web browser. Certain elements of the page can therefore be generated on-the-fly so that the page changes each time it is loaded. For instance, you can use PHP to show the current date and time at the top of each page in your site, as you'll see later in this lesson.

    The name PHP is a recursive acronym that stands for PHP: Hypertext Preprocessor. It began life called PHP/FI, the "FI" part standing for Forms Interpreter. Though the name was shortened a while back, one of PHP's most powerful features is how easy it becomes to process data submitted in HTML forms. PHP can also talk to various database systems, giving you the ability to generate a web page based on a SQL query.

    For example, you could enter a search keyword into a form field on a web page, query a database with this value, and produce a page of matching results. You will have seen this kind of application many times before, at virtually any online store as well as many websites that do not sell anything, such as search engines.

    The PHP language is flexible and fairly forgiving, making it easy to learn even if you have not done any programming in the past. If you already know another language, you will almost certainly find similarities here. PHP looks like a cross between C, Perl, and Java, and if you are familiar with any of these, you will find that you can adapt your existing programming style to PHP with little effort.


    Server-Side Scripting


    The most important concept to learn when starting out with PHP is where exactly it fits into the grand scheme of things in a web environment. When you understand this, you will understand what PHP can and cannot do.

    The PHP module attaches to your web server, telling it that files with a particular extension should be examined for PHP code. Any PHP code found in the page is executedwith any PHP code replaced by the output it producesbefore the web page is sent to the browser.

    File Extensions The usual web server configuration is that somefile.php will be interpreted by PHP, whereas somefile.html will be passed straight through to the web browser, without PHP getting involved.


    The only time the PHP interpreter is called upon to do something is when a web page is loaded. This could be when you click a link, submit a form, or just type in the URL of a web page. When the web browser has finished downloading the page, PHP plays no further part until your browser requests another page.

    Because it is only possible to check the values entered in an HTML form when the submit button is clicked, PHP cannot be used to perform client-side validationin other words, to check that the value entered in one field meets certain criteria before allowing you to proceed to the next field. Client-side validation can be done using JavaScript, a language that runs inside the web browser itself, and JavaScript and PHP can be used together if that is the effect you require.

    The beauty of PHP is that it does not rely on the web browser at all; your script will run the same way whatever browser you use. When writing server-side code, you do not need to worry about JavaScript being enabled or about compatibility with older browsers beyond the ability to display HTML that your script generates or is embedded in.

    PHP Tags
    Consider the following extract from a PHP-driven web page that displays the current date:

    Today is <?php echo date('j F Y');?>


    The <?php tag tells PHP that everything that follows is program code rather than HTML, until the closing ?> tag. In this example, the echo command tells PHP to display the next item to screen; the following date command produces a formatted version of the current date, containing the day, month, and year.

    The Statement Terminator The semicolon character is used to indicate the end of a PHP command. In the previous examples, there is only one command, and the semicolon is not actually required, but it is good practice to always include it to show that a command is complete.


    In this book PHP code appears inside tags that look like <?php ,  ?>. Other tag styles can be used, so you may come across other people's PHP code beginning with tags that look like <? (the short tag), <% (the ASP tag style) or <SCRIPT LANGUAGE="php"> (the script tag).

    Of the different tag styles that can be used, only the full <?php tag and the script tag are always available. The others are turned off or on by using a PHP configuration setting. We will look at the php.ini configuration file in Lesson 23, "PHP Configuration."

    Standard PHP Tags It is good practice to always use the <?php tag style so your code will run on any system that has PHP installed, with no additional configuration needed. If you are tempted to use <? as a shortcut, know that any time you move your code to another web server, you need to be sure it will understand this tag style.





    Anything that is not enclosed in PHP tags is passed straight through to the browser, exactly as it appears in the script. Therefore, in the previous example, the text Today is appears before the generated date when the page is displayed.

    end of this lecture to continue later today

    ₹TôpþøyZ Member

    Member Since:
    Sep 30, 2010
    Message Count:
    153
    Likes Received:
    0
    Oya start...let it be more clearer

    mbond Upcoming Guru

    Member Since:
    Oct 1, 2010
    Message Count:
    79
    Likes Received:
    5
    Guy thank you 4 opening this topic.pls update us regularly.

    Enter Member

    Member Since:
    Oct 1, 2010
    Message Count:
    15
    Likes Received:
    0
    Welldone bro, nice topic.
    • Administrator
    • Super Moderator
    • GL Legend
    • Guru Member

    press2 Administrator

    Member Since:
    Sep 20, 2010
    Message Count:
    1,806
    Likes Received:
    524
    nice 1 dude.

    Raymond1010 Member

    Member Since:
    Sep 30, 2010
    Message Count:
    12
    Likes Received:
    0
    perfect thread!

    iykemega Member

    Member Since:
    Oct 3, 2010
    Message Count:
    6
    Likes Received:
    0
    9ice thread

    kingsbig2001 cryptic life

    Member Since:
    Oct 1, 2010
    Message Count:
    16
    Likes Received:
    0
    how can we upgrade our server certificates via php

    davidabu Member

    Member Since:
    Oct 12, 2010
    Message Count:
    5
    Likes Received:
    0
    nice topic bro.
    • GL Senior Member
    • GL Legend
    • Guru Member

    POSSIBLE GL Senior Member

    Member Since:
    Sep 30, 2010
    Message Count:
    4,909
    Likes Received:
    3
    Dude nice 1. Keep it up.

    Alves Member

    Member Since:
    Oct 1, 2010
    Message Count:
    964
    Likes Received:
    0
    [blink][glow=red,2,300]Thread owner Appear[/glow][/blink]
    • Guru Member

    PROFICEMUGâ„¢ Guru Member

    Member Since:
    Oct 1, 2010
    Message Count:
    492
    Likes Received:
    1

    Alves Member

    Member Since:
    Oct 1, 2010
    Message Count:
    964
    Likes Received:
    0
    DEFINITELY
    • GL Legend
    • Guru Member

    FITZ GL Legend

    Member Since:
    Oct 1, 2010
    Message Count:
    3,366
    Likes Received:
    7
    Threadowner,u don d laxityooo,update us naaa,iykemega wetin u de do here,shey u don open ur owm website as megaslodge
    • GL Legend
    • Guru Member

    FITZ GL Legend

    Member Since:
    Oct 1, 2010
    Message Count:
    3,366
    Likes Received:
    7
    Threadowner buckle up
    • Guru Member

    slimshady Guru Member

    Member Since:
    Oct 1, 2010
    Message Count:
    324
    Likes Received:
    0

    ¤~SHEZVAR™~¤ Member

    Member Since:
    Oct 1, 2010
    Message Count:
    136
    Likes Received:
    0
    I have seen this article b4 updating this myth be a problem cos he copied and pasted it here. Hey thumb up 4 thread owner no hard feelings mhen.
    • GL Senior Member
    • GL Legend
    • Guru Member

    POSSIBLE GL Senior Member

    Member Since:
    Sep 30, 2010
    Message Count:
    4,909
    Likes Received:
    3
    Whats going on here?
    • Super Moderator
    • GL Legend
    • Forum Author
    • Guru Member

    Godvilla® Super Moderator

    Member Since:
    Oct 2, 2010
    Message Count:
    3,627
    Likes Received:
    37
    Current Phone:
    iphone 7 Running on Android 7.7
    As u relax and enjoy the christmas holiday while browsing, i'll want u to have more fun by joining this website. Good Luck!!! http://www.paybox.me/r/godvilla


Share This Page