Okay, I don't understand this at all. Maybe someone more polished could help me. I am trying to enter a group of numbers into the database using PHP and it works on my personal server, but then when I try it online it only takes the first number of the group. Is it possible that the online server has some sort of protection against filling the database with numbers? I just don't get it. Here's my code:
$percentage = mysql_prep($_POST['percentage']); $chosen_answers = mysql_prep($_POST['chosen_answers']); $chosen_answers = explode(",", $chosen_answers ); $username = $_SESSION['username']; foreach($chosen_answers as $value) echo $value.'<br />'; $tstring = implode(',' , $chosen_answers); foreach ($chosen_answers as $value) echo ($value.'<br>'); $tstring = implode(',', $chosen_answers); $query = "INSERT INTO bi_users_quiz_takers ( id, username, percentage, answers ) VALUES ( NULL, '$username', $percentage, '($tstring)' )";
Like I said, it works perfectly on my personal server, but on the online server I only get the first number. Any ideas what I should do? Thank you!