I have put 17 variables into an array, and then ran mysqli_real_escape_string
on them, as it's much easier than having to do it for each variable individually.
$rescape = array($username, $fname, $lname, $nationality, $landline, $mobile, $email, $nationalid, $passport, $dob, $street, $towncity, $postcode, $country, $country, $favourite, $rentpw);
$rescape = array_map('mysqli_real_escape_string', $rescape);
If I understand correctly, now the escaped strings are all stored inside the array in $rescape
.
What is the 'shortest' method of getting them back into individual variables?