What is the difference between PHP and JavaScript?

Discussion in 'Programming' started by 3DProf4online, Aug 21, 2008.

  1. #1
    Hello guys could you please explain an newbie how these technologies are different from each other?
     
    3DProf4online, Aug 21, 2008 IP
  2. xlcho

    xlcho Guest

    Messages:
    532
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, pretty much everything is different :)
    The main difference is that PHP is server side and javascript is client side (runs on client's comptuter).
    PHP can connect to DBs, open files and generally do stuff that other programming languages can. Javascript can only manipulate a web page.
     
    xlcho, Aug 21, 2008 IP
  3. 3DProf4online

    3DProf4online Peon

    Messages:
    906
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What do you mean by server and client side? As far as I know PHP files are creacted in the following way. First, website is built by the help of such the programs as Dreamweaver and can be configured on the localhost server. When a website is ready it is downloaded to hosting. What is about JavaScripts? What are advantages of JavaScripts and when it is better to use this programming language?
     
    3DProf4online, Aug 21, 2008 IP
  4. clinton

    clinton Well-Known Member

    Messages:
    2,166
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    110
    #4
    One is client side and the other is server side. Totally different languages!

    One is executed(on the server) before the page is presented to the browser and client side is executed or used after the browser loads the page.
     
    clinton, Aug 21, 2008 IP
  5. 3DProf4online

    3DProf4online Peon

    Messages:
    906
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Could you please just explain what things can't be performed without Java Script?
     
    3DProf4online, Aug 28, 2008 IP
  6. rcadble

    rcadble Peon

    Messages:
    109
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Mostly browser touchups, such as showing a little menu that pops up when you click a button, are Javascript. Server-side or secure commands, such as accessing a database, are done with PHP. Javascript code is evaluated by the browser, while PHP is executed by the server and not the browser. They also have different syntax and functions.
     
    rcadble, Aug 28, 2008 IP