ידעתי שזה foreach לא ידעתי רק איך להשתמש תודה.. אבל זה מראה לי שגיאה כזאתי :
קוד:
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option,questionid,votes) VALUES('2', '3', '0')' at line 1
טוב זה לא קשור לתנאי זה כבר קשור ל insert
סתכל :
קוד:
foreach($_POST['option'] as $option) {
mysql_query("INSERT INTO polloptions (option,questionid,votes) VALUES('".$option."', '".$question_id."', '0')") or die("ERROR: ".mysql_error());
}