I am trying to take three questions yes or no questions and make them post into a database so I can analyse trends at a later date, I currently have the totals being tallied by JS and the result revealed by Jquery but I want to take it a step forward and hold onto the information from the three questions but I'm having no success I'm not getting an error message but it isn't creating entries into the database. The JS is still working however. Does anyone have any ideas on where I am going wrong? Thanks in advance!
<?php
$host="XXXXXXXX"; // Host name
$username="XXX"; // Mysql username
$password="XXX"; // Mysql password
$db_name="XXXXXX"; // Database name
$tbl_name="test_mysql"; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
// Get values from form
$question0=$_POST['question1'];
$question1=$_POST['question2'];
$question2=$_POST['question3'];
// Insert data into mysql
$sql="INSERT INTO $tbl_name(Q1, Q2, Q3)VALUES('$question0', '$question1', '$question2')";
$result=mysql_query($sql);
?>
<p class="click" id="blue"> You are only charged interest on the amount that is remaining at the end of the month<br>
<input type="radio" name="question0" value="A" class="click" id="blue"> True </radio>
<input type="radio" name="question0" value="B" class="click" id="blue"> False </radio>
<p class="click" id="blue">I have to pay off the balance in full every month <br>
<input type="radio" name="question1" value="A" class="click" id="blue"> True </radio>
<input type="radio" name="question1" value="B" class="click" id="blue"> False </radio>
<p class="click" id="blue">If I don't make a payment my credit score will be unaffected<br id="blue">
<input type="radio" name="question2" value="A" class="click" id="blue"> True </radio>
<input type="radio" name="question2" value="B" class="click" id="blue"> False </radio></p>
<button type="button" class="btn btn-primary btn-xl page-scroll" onclick = "returnScore()" id="click" width="560px">Results</button>