For example, i have this input:
Name: Wally
Email: wallycat@example.com'; DROP TABLE ClientTable; PRINT 'Too bad!'--
My parameterized query is:
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$sql = "INSERT INTO ClientTable (Name, Email)
VALUES ('$name', '$email')";
Even if I use this parameterized query, do I need to validate the user input? (in this case, the email field)
Or, is already safe since i'm using a parameterized query, and the query will simple store all this: 'wallycat@example.com'; DROP TABLE ClientTable; PRINT 'Too bad!'--' in the database?
Thank you!