iFre3styLe
New Member
I have this pesky problem where the some mysql columns do not get populated with php post data while others are successful.Code for form submission (I'm using twitter bootstrap so code is slightly different):\[code\]<form action="inputa.php" method="post"> <fieldset> <label>Answers</label> <input type="text" name="q1" placeholder="Question 1"><br> <input type="text" name="q2" placeholder="Question 2"><br> <input type="text" name="q3" placeholder="Question 3"><br> <input type="text" name="q4" placeholder="Question 4"><br> <input type="text" name="q5" placeholder="Question 5"><br> <input type="text" name="q6" placeholder="Question 6"><br> <input type="text" name="q7" placeholder="Question 7"><br> <input type="text" name="q8" placeholder="Question 8"><br> <input type="text" name="q9" placeholder="Question 9"><br> <input type="text" name="q10" placeholder="Question 10"><br> <input type="hidden" name="sID" value="http://stackoverflow.com/questions/13794455/<?php echo $_GET['sid']; ?>"><input type="hidden" name="tID" value="http://stackoverflow.com/questions/13794455/<?php echo $_GET['tid']; ?>"> <button type="submit" class="btn">Submit</button> </fieldset></form>\[/code\]And here is the php code to store in mysql:\[code\]$stopicid = $_POST["sID"];$topicid = $_POST["tID"];$q1 = $_POST["q1"];$q2 = $_POST["q2"];$q3 = $_POST["q3"];$q4 = $_POST["q4"];$q5 = $_POST["q5"];$q6 = $_POST["q6"];$q7 = $_POST["q7"];$q8 = $_POST["q8"];$q9 = $_POST["q9"];$q10 = $_POST["q10"];$con = mysql_connect("###","#####","###");if (!$con){ die('Could not connect: ' . mysql_error());}mysql_select_db("db", $con);mysql_query("INSERT INTO assessments (q1, q2, q3, q4, q5, q6, q7, q8, q9, q10, tID, stID) VALUES ('$q1', '$q2', '$q3', '$q4', '$q5', '$q6', '$q7', '$q8', '$q9', '$q10', '$topicid', '$stopicid')");mysql_close($con);echo("Successful!");\[/code\]Problem is, everything BUT \[code\]tID\[/code\] and \[code\]stID\[/code\] is populated when I try to submit the form, no matter what. I've even tried recreating the table from scratch, to no avail. The table is using utf8 collation.