I'm wonding if the HTML code below (in conjunction with htmlspecialchars when processing) is enough to prevent SQL Injection:
<input name="email" type="email" required id="email" placeholder="Your Email Address" title="Valid email required" autocomplete="on" maxlength="50">
Will this prevent dangerous manipulation of variables as long as I use htmlspecialchars before sending it to my database? Or is there a workaround a hacker could use to enter whatever format they want?
I will be using prepared statements and bound params. My concern is if someone uses an older browser or device, will the HTML validations like "required" or type="email" still work. Could someone bypass them somehow? I need to know for error handling in my php code when I go to process this before sending to database... I think... Sorry, I'm kinda new to this so I hope I'm making sense.