Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Understanding PHP

  1. Jan 13, 2016 #1
    I'm really stuck at knowing about PHP..
    What will happen without using PHP on your website?
    I know it's server side but why we need it?to process forms?how PF uses PHP?
     
  2. jcsd
  3. Jan 13, 2016 #2

    phinds

    User Avatar
    Gold Member
    2016 Award

    If you have a static web site that just displays things there is no need for PHP. If you have an interactive web site, then PHP is one of many tools you can use for code creation.
     
  4. Jan 13, 2016 #3
    PHP also integrates well with SQL, so it's useful if your website requires some database processing.
     
  5. Jan 13, 2016 #4

    jtbell

    User Avatar

    Staff: Mentor

    My site isn't interactive and doesn't use any databases, but I nevertheless use PHP. First, it lets me adjust internal links automatically so that they work properly both on the server on my home computer, and on my public web hosting provider. This lets me develop and test new pages completely on my home computer before uploading them and making them public. Second, I can use an "include file" to insert code that's the same on each page, so if I ever need to change that stuff, I don't have to edit every single page.

    In practice the pages look mostly like ordinary HTML and CSS, with a little bit of PHP code sprinkled in.
     
  6. Jan 13, 2016 #5
    As people explained, it is mostly for interactive web sites. For instance, on PF you will have users and their roles, all of which are defined and stored also their credentials in one or more databases; so your posts, your profiles, etc can be edited, remembered and available for search by the system and other users.
    To process a form, your client will send a request that contains his intent to the server. PHP will help you to extract the sent data and process/store them for particular purpose depending on your design and make a response after everything is successfully done. Today such a request-response model is re-formed via use of RESTful web-services.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Understanding PHP
  1. PHP Help ? (Replies: 16)

  2. Php or c++ ? (Replies: 40)

  3. Advise: PHP or Java (Replies: 9)

Loading...