Jump to content

[SOLVED] Validate in JS and PHP?


smc

Recommended Posts

JS would be fine for verification, but ultimately you want the validation on the page that cannot be manipulated. I can create a script that would post to your script which would then bypass the jscript validation system. Use javascript to Verify, and PHP to validate as that is where the data cannot be altered anymore before database insertion.

JS can be hacked several ways.. simplest is url inject (in the address bar type like.. javascript:void(cookie="VAR=VALUE");)

 

doesn't always work, depends on how you set up the code.. the point is, it's always best to use php over javascript, in my opinion you should get rid of the JS completely and go pure php (in validating/handling data)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.