Hello,
I am trying to post a form with two fields (name and email) into a MySQL table.
On local server (my laptop), it works just fine.
But on production server, it is posting twice!
I can't figure out why.
Here is the code:
$name = ucwords(strtolower(trim($_POST['name'])));
$email = strtolower(trim($_POST['email']));
$mysqli = new mysqli($server, $serveruser, $serverpass, $dbname);
$name = $mysqli->real_escape_string($name);
$email = $mysqli->real_escape_string($email);
$sql = "INSERT INTO table_name (name, email) VALUES ('" . $name . "', '" . $email .
"')";
$res = mysqli_query($mysqli, $sql);
It is driving me nuts.