DEV Community

Discussion on: Cross-site Scripting (XSS) and ways to prevent it in PHP applications

Collapse
 
giulio profile image
Giulio "Joshi"

I do agree, also using filter_input() and filter_input_array() should be preferred to using superglobals.

<?php
$customerEmail = filter_input( INPUT_GET, 'user_email', FILTER_SANITIZE_EMAIL );
Enter fullscreen mode Exit fullscreen mode
Collapse
 
qbentil profile image
Bentil Shadrack

Thanks for the input