PHP differ from javascript
merkutinaa
Posts: 1
How does PHP differ from javascript? I'm confused about what the purpose of php's existence is. My understanding is that it does the same as javascript, but server-side. Does that make sense, or am I totally off?
Comments
They can do more or less the same thing, like hiding input field.
But they can also do total different things, in javascript for example you can monitor the users keystrokes and mouse clicks.
While PHP is invisible to the user (except for the .php extension), Your javascript code can be seen by everyone (and thus copied).
With PHP you can dynamicly change the page before it is send to the browser, you can load some records from a database. A good example is a forum (like this ).
BTW: How did you get to this forum?