I really need some help with this. I've been struggling for days with this code. I can't get my formdata in the mysqltable with this script and I don't know why. I've included a script which catches the form data called input.php
<?php
$email = cubrid_real_escape_string($_POST['email']);
?>
and I have the following file which makes a connection to the database and inserts the data into the MySQL database. I just don't get what I'm doing wrong. It's so frustrating.
<?php
include ('input.php');
$hostnaam = "10.184.19.114";
$gebruikersnaam = "u272085_user";
$wachtwoord = "123";
$dbnaam = "db272085_contactinfo";
$con=mysqli_connect($hostnaam, $gebruikersnaam, $wachtwoord, $dbnaam);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
// Perform queries
//mysqli_query($con,"SELECT * FROM Persons");
mysqli_query($con,"INSERT INTO `db272085_contactinfo.contact` (`id`, `email`) VALUES (id, "'.$email.'")");
mysqli_close($con);
?>