Closed Thread Icon

Topic awaiting preservation: Validating on client side or server side? Pages that link to <a href="https://ozoneasylum.com/backlink?for=8775" title="Pages that link to Topic awaiting preservation: Validating on client side or server side?" rel="nofollow" >Topic awaiting preservation: Validating on client side or server side?\

 
Author Thread
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 07-24-2003 00:23

Hi, guys. I have to ask you this as well.
I have been just wondering which is better to do validating user info, JavaScript or PHP?
JavaScript seems to be better to me cuz it is much straight away to tell the user.
I cannot see the point that a lot of web site is using server side language to validate things. Do you know why?
Looking forward to hearing from you soon.
Cya.

Hiroki Kozai

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 07-24-2003 00:29

Hiroki:

quote:
I cannot see the point that a lot of web site is using server side language to validate things. Do you know why?



Because then you can be assured that it is actually done - JavaScript can be turned off which rather ruins the whole thing.

___________________
Emps

FAQs: Emperor

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 07-24-2003 00:38

Hi, Emp. Glad to hear from you!
How are you today?

quote:
JavaScript can be turned off which rather ruins the whole thing.



Is that right? You mean user can turn it off???
Would you know how to do that?

Hiroki Kozai

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 07-24-2003 01:48

Each web browser has an option ofor turning scripting on/off. For example, to turn JavaScript off in Internet Explorer, go to Tools / Internet Options / Security and in the list of options find the one entitled "Active Scripting" and disable it...


Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-24-2003 03:26

Yeah, since JavaScript isn't reliable (making sure your page works even with javascript turned off is always a good idea), you always need to do validation on the server side. Doing validation on the client side is an optional extra, because that gives the user immediate feedback (like you said) that their input isn't valid. But never rely on JavaScript to stop the user from doing something that could be dangerous to your web site or server.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 07-25-2003 01:38

Hi, guys.
Many many thanks for your reply.
How are you today?
It has been very hard to get up before 7am every morning since I am back to school on Monday.
Well, Mr.Max:

quote:
options find the one entitled "Active Scripting" and disable it...



I did it. But it has not been disabled. I don't know why....
What I did is that I found Tools > Internet Options > security > custom level > Active Scripting > disabled. Then I tried to open my html files including JavaScript. But still it is working fine. My alert box pops up when page is opened. And calculation stuff works find etc. Why is that still working??? Would you have any idea?

Hiroki Kozai

« BackwardsOnwards »

Show Forum Drop Down Menu