Getting Zero Errors using an Insert command but 0 data is going into my Database


I got a database with 2 columns. Retrieving data from it I have 0 problems, but inserting Data is a different story. The code I got from a tutorial seems pretty straightforward, but implementing it seems a bit of a challenge especially that I am getting 0 errors. Been at this code for quite sometime, and I think at this point it would be beneficial to have someone take a second look at it.

$conn = new PDO('mysql:host=Jamal-PC;dbname=japanesewords',$username,$password);

$Englishword = $_POST['EnglishWord'];
$Japaneseword = $_POST ['JapaneseWord'];
echo '<pre>';
echo '</pre>';
$q = "INSERT INTO Japanesedefinition(Japaneseword,Englishword)VALUES(:Japaneseword,:Englishword):";
$query = $conn->prepare($q);
$result = $query->execute(array(

}catch(PDOException $e){
 echo 'ERROR: ' . $e->getMessage();


The query returns:
    [JapaneseWord] => konnichiwa
    [EnglishWord] => hi

The variables have to be pound to parameters, this is done inbetween preparing the SQL query and executing it. Have a read of the for some more info

Okay, the only thing I see is the : at the end of your Query… Execute can take an array to bind on prepared statements, so that looks okay.

What looks odd, is the part in red

"INSERT INTO Japanesedefinition(Japaneseword,Englishword)VALUES(:Japaneseword,:Englishword)[color=red][b]:[/b][/color]"

Try echoing out $query->errorInfo(); after the execute.

It was the bloodily colon. Thank you so much.