My php file inserts into table row 0 values, I cannot find solution for that.
<?php
$selected_button = $_POST['a'];
$conn = mysql_connect('localhost','root','');
if(!$conn )
{
die('Could not connect: ' . mysql_error());
}
$sql = "INSERT INTO answers (member_id, question_id, answer) VALUES (1, 2,'$selected_button')";
mysql_select_db('ipad',$conn);
$result = mysql_query($sql, $conn);
if(!$result)
{
return false;
}
return true;
mysql_close($conn);
?>
after insert i receive, member_id = 0 ; question_id = 0 ; answer = NULL
$result = mysql_query($sql, $conn);to$result = mysql_query($sql, $conn) or die('ERROR: ' . mysql_error());and check if it breaks the code..ipad.. referring to the screenshot..