Why is it that we need to use PHP in web design?

Discussion in 'Programming' started by cipals15, Nov 15, 2008.

  1. #1
    What is the main purpose of php?

    I installed my Apache and PHP latest version. I tried programming in php but i couldn't find anything good with it.

    When is the right time to use php? Should i use php or javascript?
     
    cipals15, Nov 15, 2008 IP
  2. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #2
    php Is good because you can store members and member details into databases, with this you can call this information and create hundreds, thousands or even millions of dynamic pages in seconds.

    Basically it makes teh job easier :)
     
    Silver89, Nov 15, 2008 IP
  3. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #3
    Interaction with databases as mentioned above is very important. Some simpler exmples:

    How long would it take you to update the footer on a 100 page site using static html?
    If your footer is included using php you simply modify one file and the change appears site wide.

    Or to change the adsense code, the header or the navigation?
     
    Colbyt, Nov 15, 2008 IP
  4. happpy

    happpy Well-Known Member

    Messages:
    926
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    120
    #4
    pure html makes you the vendor
    php is your vending machine
     
    happpy, Nov 15, 2008 IP
  5. rene7705

    rene7705 Peon

    Messages:
    233
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    u need php for the backend, javascript to spice up the browser's end..
     
    rene7705, Nov 15, 2008 IP
  6. Aldo

    Aldo Peon

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You don't need PHP, but its a smart thing to have some kind of server side language, so you can run a forum, blog, and whatever. Usually without such a server side language setup on your server, you can't really make super interactive sites. You could with JS and such, but no where near as much as you can with PHP
     
    Aldo, Nov 15, 2008 IP
  7. Social.Network

    Social.Network Member

    Messages:
    517
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    35
    #7
    The title is a bit misleading, web design is programming language independent. Also, if you cannot find anything good to do with PHP may I suggest you read about web development technologies and tools. For programmers, it is obvious what one can do with PHP and other languages. Lastly, Javascript is a client-side language and PHP is server-side. This forum (product) was developed using PHP.
     
    Social.Network, Nov 15, 2008 IP
  8. keym4k3r

    keym4k3r Peon

    Messages:
    250
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    As it is mentioned earlier PHP is server side language while JS is browser side language.
    The difference is that in PHP the code is processed by server, and browser gets only the result of code,
    while with JS the whole code is sent to browser that has to compute it on-fly.
    For example you cannot make the login page in JS, because you have to sent out the code that checks the password, so anyone can read it. When you make it in PHP no one can see the code.
     
    keym4k3r, Nov 15, 2008 IP
  9. Zeras

    Zeras Guest

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    In the past, I used php to create completely applications but as ajax has grown in popularity and implementation, I have been moving more and more toward using php for back-end processing and ajax (javascript/css/html) for front-end processing.

    The big advantage in using server-side programming is that the user/client never sees the source code which provides a higher degree (although not perfect of course) level of security. However, a big advantage in using client-side programming is that it puts the processing load on the user's computer instead of your servers.

    -Zeras
     
    Zeras, Nov 16, 2008 IP
  10. JoeStec

    JoeStec Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10

    Keym4k3r sums it up quite well. Php allows for secure functionality within a website. People *can* still find exploits, but it's not nearly as easy.
     
    JoeStec, Nov 16, 2008 IP
  11. Napoleon

    Napoleon Peon

    Messages:
    732
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Php can be integrated easily with HTML and open source.
     
    Napoleon, Nov 16, 2008 IP
  12. haoyou2008

    haoyou2008 Banned

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    php is vary easy to use because it is a script language. and yor can also find more php hosting than jsp and .net
     
    haoyou2008, Nov 16, 2008 IP
  13. mysoogal

    mysoogal Guest

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    that's like saying why does nasa need python language to operate its shuttles :D
     
    mysoogal, Dec 4, 2008 IP
  14. wh0

    wh0 Banned

    Messages:
    146
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    html is all output based, where as php is input based.. if you tryed to store data via html you would fail misserably :).
     
    wh0, Dec 4, 2008 IP
  15. pitagora

    pitagora Peon

    Messages:
    247
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Simply because there is more hosting around is not a valid reason. You need to take into account the development time for the average enterprise web application and memory/cpu requirments for a medium to large project. Yes, php is easy, quick and fast, as long as you are not aiming at enterprise. If your website's script is very complex or requires a lot of cpu you are much better of with asp.net (or even jsf - though I'm not a java fan).
     
    pitagora, Dec 9, 2008 IP