Should I sanitise this first?

I am using this code

[code]



[/code]

in a widget area on a Wordpress page and it is calling a custom page where I process the input.

From a security / good practice perspective should I be doing something with the input before passing it to the custom page? I am sanitising it on the custom page before doing any processing.

No the form should just submit the data. If you have use cases where the user may input invalid data it is wise to have some sort of error checking in js before submitting the form.

Thanks JimL, that is what I thought but it was best to check first. Still learning.

Sponsor our Newsletter | Privacy Policy | Terms of Service