validation to insert data into DB

Security issues related to php and mysql usage. How to make your code secure? Security measures and configurations? It's all in here!

Moderators: macek, egami, gesf

Post Reply
johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: validation to insert data into DB

Post by johnj » Sun Aug 12, 2012 5:56 am

Honestly you should use both. Client side validations are there to help a genuine user to enter the right data. Server side validations are mostly there to protect the server from malicious users.
...what if i wanna insert an email into a database, and javascript validation passed and it's a valid email, should i use a further server side validation?...
YES. if it passed js validation that means we have helped the user to enter the right data. We still need server side validations to protect the server/application from malicious users.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest