PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
for ($i = 0; $i < count($filename); $i++)
{
mysql_query("INSERT INTO carts (itemname,userid) VALUES (". $filename[$i] .",". $userid .")");
}
It's a loop I'm running, but it doesn't want to work properlly. $filename is a series a checkboxes with the name filename[]. I may be doing something wrong in the mysql_query because nothing gets stored. Where did I do the typo? I tried quotes/no quotes on the variables for $filename[$i] and $userid, but I still don't get any results. No errors, no information stored in the database. Thank you.