I have 2 fields(text box in html form) user_name and password.
example=
<?php
user_table
$mail = $_POST['mail'];
$pswrd = $_POST['passwrd'];
$addtouser = $mysqli->query("INSERT INTO(
emails,
passwordss) VALUES ('$mail', '$pswrd')");
?>
How to secure Password field from SQL Injection and XSS (Cross Site Scripting) in php 5.6 and mysql on INSERT and select query ?
is password field accept all special characters like as " , ' , > etc ?
i am new in php,
i need full example code and security tips that prevent password field from sql injection and xss.
sorry for bad typing. i am new in stackoverflow.
Thanks in advance !!!