View Full Version : Javascript vs PHP for User Profiles

19 May 2011, 12:35 AM
Hey Guys,
I started building web pages again recently and after brushing off the dust of my HTML knowledge I decided to give myself a long term project. I want to build a website that allows users to sign up and have a profile. I am not making a social networking site I just want to know how to do this in case I want to allow users to join my site. I would want the basics. Name, Email, answer a few personal questions etc. I was wondering what would be better javascript or PHP. I dont really know much about these languages but I am quite skilled with other languages like C++, java, and VB so I would just have to learn the syntax. Just want to know which one to learn first. Thanks

Clockwork Bear
19 May 2011, 03:03 AM
You are really going to need both to make the website the best it can be. PHP is run on the server and should be used to process the form and carry out any critical must have validation, for security reasons. Javascript is run on the clients machine and can be turned of or easily replaced. Use this to add extra user-friendly validation and features. Never have validation of the input done in javascript alone unless your system can handle the input without validation.