PHP Login, Syntax, Comment, and Letter Accuracy

In addition to learning HTML5 & CSS3 and JavaScript, we need to learn PHP. While the basic website with HTML5 learns to create page structure, you have learned to improve the website visually with CSS3. We have assigned various things with JavaScript to determine the behavior of the website. Now we are facing the PHP we will do while we writing our original website.

 

What Is PHP ?

If PHP is pre-taught, PHP is the abbreviation of ”Hypertext Preprocessor PHP. PHP is an open source software. For PHP to work, we need a program that converts to a server or a server that we install on our own computer.

 

PHP supports a wide range of databases and is compatible with almost all types of servers today, that’s programming language making it popular. The codes that you type in PHP are displayed in HTML when the source of the page is displayed. All the PHP code you’ve written looks like an HTML when the page source display is done in the browser. Before you start PHP classes, you should definitely know that the three basic things you need to know are HTML, CSS and JavaScript.

 

What can be done with PHP ?

PHP basically allows us to do different operations such as adding something to our database, deleting, data encryption, form data collection. The following items are about what you can do with PHP and what it can do to make it happen in your mind.

 

  • PHP can generate dynamic page content.
  • PHP can create, open, read, write, delete, and close files on the server.
  • PHP can collect form data.
  • Send and receive PHP cookies.
  • PHP can add, delete, and modify data in your database.
  • PHP can be used to control user access.
  • PHP can encrypt data.

 

PHP is not limited to HTML only. Allows you to print Flash movies and even PDF files.

 

Introduction to PHP

The classic ya Hello World ”design will start with ise Hello PHP”. If you want to do something on the screen in PHP screen, print, printf and echo tags. Print and printf may look familiar to you from somewhere, but let’s start with echo now.

 

PHP Display Print

In PHP use de to display Hi PHP to print:

<?php
echo "Hello PHP";
?>

We have now understood that the above PHP start tag is <?php and the closing tag is ?> . If this is the code editor, which is the extension, register it as .php and copy it into the folder WWW in Wamp Server that you installed on your computer. Then you can view this page from your browser.

 

PHP Comment Line

In PHP you can use the comment tags to add something later, explain the lines that are missing, and then return and edit something missing. The comment tags in PHP are:

// what is written is a single line php comment tag.
# what is written is a single line php comment tag.
/ * php comment tag is too many lines to what you post it * /

The parts that are green as seen above are the beginning of the labels. The single-line comment tags do not need to close their breaks, but the * / mark is used as closing because many lines of comment are not known in the multi-line comment tag.

 

PHP Case Accuracy

In PHP, case sensitive is valid only for data types. Immediately with an example, we will give you the above echo command if you want to write all the letters even if you work big. However, in the case that you will see below, the first and second examples will work, while the three and fourth examples will not work.

$colr="blue";
echo "Color of my car".$colr;
ECHO "Color of my car".$colr;
echo "Color of my car".$COLR;
ECHO "Color of my car".$Colr;

We have identified a data type with the blue color as we have seen above, and we will show it in the article with the point that is the merge element in PHP. You can change all the letters of the echo tag that we use to display text as small, but the color part that we specify as a data type should be written just as it is. So the third and fourth line will not work.

 

The above is basically the first introduction lesson in PHP. In the next PHP lessons we will move on to put things on them. Therefore, it will benefit you to have a good understanding of these parts.

Leave a Reply

Your email address will not be published. Required fields are marked *