Thursday, 13 April 2017

PHP FOR WEB DEVELOPERS

                                                                    PHP
                                         (HYPERTEXT PREPOCESSOR)

PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer.


PHP is an extremely popular, Open Source scripting language, most commonly used on webservers to produce dynamic pages. The name "PHP" is a recursive acronym for "PHP: Hypertext Preprocessor" and was initially created by Rasmus Lerdorf in 1994. As of today, the current version of PHP is version 5, with version 6 in the making. 

As mentioned, PHP is mostly used on websites, which is what this tutorial will focus on. You may wish to set up your own test server, which is very easy to do, using the next couple of chapters to help you out. If you already have a server up and running, or at least access to a server running PHP 5, you can jump to one of the next sections, where we will start writing some PHP. You may go through all the chapters of this tutorial step by step, or you may jump between chapters to learn specific things - it's really up to you. 

 Lets see some of the applications of php in the real time..   
What is real-time?
The real-time web is a set technologies and practices that enable users to receive information as soon as it is published by its authors, rather than requiring that they or their software check a source periodically for updates. 
Advantages of PHP
  • Open source: It is developed and maintained by a large group of PHP developers, this will helps in creating a support community, abundant extension library.
  • Speed: It is relative fast since it uses much system resource.
  • Easy to use: It uses C like syntax, so for those who are familiar with C, it’s very easy for them to pick up and it is very easy to create website scripts.
  • Stable: Since it is maintained by many developers, so when bugs are found, it can be quickly fixed.
  • Powerful library support: You can easily find functional modules you need such as PDF, Graph etc.
  • Built-in database connection modules: You can connect to database easily using PHP, since many websites are data/content driven, so we will use database frequently, this will largely reduce the development time of web apps.
  • Can be run on many platforms, including Windows, Linux and Mac, it’s easy for users to find hosting service providers.
Disadvantages of PHP
  • Security : Since it is open sourced, so all people can see the source code, if there are bugs in the source code, it can be used by people to explore the weakness of PHP
  • Not suitable for large applications: Hard to maintain since it is not very modular.
  • Weak type:  Implicit conversion may surprise unwary programmers and lead to unexpected bugs. For example, the strings “1000” and “1e3” compare equal because they are implicitly cast to floating point numbers.
HTML CODE NEEDED FOR LOGIN FORM.
<form action="/action_page.php">
  <div class="imgcontainer">
    <img src="img_avatar2.png" alt="Avatar" class="avatar">
  </div>

  <div class="container">
    <label><b>Username</b></label>
    <input type="text" placeholder="Enter Username" name="uname" required>

    <label><b>Password</b></label>
    <input type="password" placeholder="Enter Password" name="psw" required>

    <button type="submit">Login</button>
    <input type="checkbox" checked="checked"> Remember me
  </div>

  <div class="container" style="background-color:#f1f1f1">
    <button type="button" class="cancelbtn">Cancel</button>
    <span class="psw">Forgot <a href="#">password?</a></span>
  </div>
</form>

here the action_page.php code will be discussed in the next blog post.

6 comments:

  1. Informative blog and it was up to the point describing the information very effectively. Thanks to blog author for wonderful and informative post...
    PHP developers in chennai | PHP developers in India

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. I found this blog truly appreciable and detailed. The way you explain your insights keeping the article compact is appreciable. Keep up with this tremendous work and continue blogging.
    Website Designer in Lucknow | Web design company

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Excellent read, Positive site, I have read a few of the articles on your website now, and I really like your style.

    ecommerce catalogue management services

    ecommerce solutions services

    ReplyDelete