PHP vs JavaScript

Discussion in 'Scripts' started by brucemc777, Sep 15, 2012.

to remove all ads.
  1. brucemc777

    brucemc777 New Member

    Messages:
    17
    I am cramming info on webdesign, and presently studying php for need of online forms, having to maintain a server database of that info and to email formfields (CGI).

    My next topic of study is presently contemplated to be JavaScript, but in my studies I started to wonder when is one used vs. the other, and if overlapping, the advantage/disadvantages of each.

    Any good resources to learn from, or can anyone put it in a nutshell for me?
     
  2. ronaldroe

    ronaldroe Super Moderator Staff Member

    Messages:
    1,223
    Php is server-side script. JS is client side, for the most part. Very little overlap.
     
  3. brucemc777

    brucemc777 New Member

    Messages:
    17
    I can see that I would use php to process form inputs and maintaining the server side database; what does one normally specifically use JS for? I am sorry if that is a stoooopid question, but the answer will help lay the foundation for my studies-

    Ohhhh, btw, many years ago I went to OCU!
     
  4. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
  5. brucemc777

    brucemc777 New Member

    Messages:
    17
    So we basically have speed and efficiency of presentation with JS, and PHP gives us storage and ways to make user action permanent, if I am grasping the concepts-
     
  6. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    Yeah, something like that :)
     
  7. brucemc777

    brucemc777 New Member

    Messages:
    17
    Alright guys.... cut me some slack, I'm learning as fast as I can!
     
  8. ronaldroe

    ronaldroe Super Moderator Staff Member

    Messages:
    1,223
    And a number of years ago, I lived in Colorado Springs. Crazy...
     
  9. Edge

    Edge Member

    Messages:
    461
    ... and Javascript relies on the browser capabilities whereas PHP doesn't. Sometimes it's handy to do stuff with a form before it's sent to a server i.e. some form of validation to minimise server overheads. There used to be an accessibility issue about using JavaScript as early versions of screenreaders used by visually impaired had trouble with it. Modern screenreaders don't have issues with JavaScript now unless it's Ajaxian and is being used to pull content onto the page which wasn't there before. However you still find some companies and organisations who still think JS is an accessibility issue however it's implemented.
     

Share This Page