I keep getting this error:
Parse error: syntax error, unexpected T_RETURN in H:\p3t\phpappfolder\public_php\project\addcustomer.php on line 12
Can anyone help me to fix it
Here is the full php code
<?php
define ("USER", "p04294726");
define ("PASSWORD", "tInny=29");
define ("HOST", "mysql.cs07.cse.dmu.ac.uk");
define ("PORT", "3306");
define ("DATABASE", "cottage");
$connection = mysqli_connect (HOST, USER, PASSWORD, DATABASE, PORT);
return true;
define ("QUERY", "INSERT INTO customers (title, forename, surname, addressone, addresstwo, city, postcode, phone, email, username, password) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,)");
$title = $_POST[title];
$forename = $_POST[name];
$surname = $_POST[surname];
$addressone = $_POST[firstadd];
$addresstwo= $_POST[secondadd];
$city = $_POST[city];
$postcode = $_POST[postcode];
$phone = $_POST[phone];
$email = $_POST[email];
$username = $_POST[user];
$password = $_POST[password];
$statement = mysqli_prepare($connection, QUERY);
mysqli_stmt_bind_param($statement,
"sssssssisss",
$_POST[title],
$_POST[name],
$_POST[surname],
$_POST[firstadd],
$_POST[secondadd],
$_POST[city],
$_POST[postcode],
$_POST[phone],
$_POST[email],
$_POST[user],
$_POST[password]);
mysqli_stmt_execute($statement);
switch(mysqli_stmt_errno($statement))
{
case 0:
$addcottageComplete = true;
$addcottageOutcomeMessage = "Customer " . $_POST[name] . " added";
break;
default:
$addcottageComplete = true;
$addcottageOutcomeMessage = mysqli_stmt_error($statement);
}
echo $addcottageOutcomeMessage;
include ("index.html");
mysqli_stmt_close($statement);
mysqli_close($connection);
?>