Error log is throwing following error: Parse error: syntax error, unexpected ';' in line 11
Any idea why I'm getting this error ? As far as my knowledge of PHP goes all PHP statements ends with semicolon. What am I missing here ?
Providing full code as requested:
<?php
if(isset($_POST['submit'])) {
$firstName = $middleName = $lastName = $address = $mobileNumber = "";
$password = $email = $result = "";
test_input($data) {
$data = stripcslashes($data); // <-- this is where error occurs
$data = htmlspecialchars($data);
$data = htmlentities($data);
return $data;
}
$link = mysqli_connect("localhost","root","ilovemyself","eshop");
if(!$link) {
echo "Could not connect to the database !";
} else {
$firstName = test_input($_POST['firstName']);
...
}
}