I have this form that is asking for a security question and answer and upon submit the data is entered into my SQL DB but for some reason when I run the form and try to print the displayed data to make sure it got entered correctly the data is blank so I check the SQL db and there was a new entry but it was all blank.
I'm trying to figure out why the form is not entering any data into the SQL DB.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<form method="post" id="myForm" name="input" action="submitSQL.php">
Security Question: <input type="text" id="sQuestion" ></br>
Security Question Answer: <input type="text" id="sqAnswer" ></br>
</br>
<input type="submit">
</form>
</body>
</html>
PHP File
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php
$sQuestion = filter_input(INPUT_POST, 'sQuestion');
$sqAnswer = filter_input(INPUT_POST, 'sqAnswer');
$conn = mysql_connect("localhost","root","")or die (mysql_error());
mysql_select_db("assignment_3", $conn);
$insert = "insert into securityquestiontable (securityQuestion, securityAnswer) values('$sqAnswer', '$sQuestion')";
$result = mysql_query($insert, $conn) or die (mysql_error());
print "<table border=1>
<tr><td>Security Question:</td><td> '$sQuestion'</td></tr></br>
<tr><td>Security Question Answer:</td> <td> '$sqAnswer'</td></tr></br>
</table>";
?>
</body>
</html>