Hi try echoing the actual query, after the variables have been converted to values
$qtrans = "insert into $tbltrans values('0', 'daily', '$building', '$itemchoice', '0', '$count', '0', '$ddate', '$cat')"; echo $qtrans ; and see if a comma or quote mark is in the wrong place. HTH Peter ----------------------------------------------- Excellence in internet and open source software ----------------------------------------------- Sunmaia www.sunmaia.net tel. 0121-242-1473 ----------------------------------------------- -----Original Message----- From: Michael Cortes [mailto:[EMAIL PROTECTED]] Sent: 29 August 2002 20:33 To: [EMAIL PROTECTED] Subject: [PHP-DB] Help with code I don't know if this is the place for a new programmer to get help. But here goes...... // list items and get input for today's item uses/receipts print ("<tr align=center valign=top>\n"); print ("<td align=left valign=top><select name=itemchoice><option>Choose Item</o ption>\n"); I am using the following code to let my users choose from a list of inventory items: $userarray = mysql_fetch_array($resultuser); while ($itemarray = mysql_fetch_array($resultitem)) { print ("<option value=$itemarray[description]>$itemarray[description]</option>\n"); } print ("</select>\n"); print ("</td>\n"); Some example items from which they choose are"apple sauce, case, 12/8oz" and "Beef, Patties Lean, A627, 40#, gov". My problem is such. When they choose and item and submit the transaction..... $qtrans = "insert into $tbltrans values('0', 'daily', '$building', '$itemchoice', '0', '$count', '0', '$ddate', '$cat')"; I am loosing all of item description after the first comma. "Beef, Patties Lean, A627, 40", gov" turns into "Beef,". Can anyone help? Michael Cortes Fort LeBoeuf School District 34 East 9th Street PO Box 810 Waterford PA 16411-0810 814.796.4795 Fax1 814.796.3358 Fax2 978-389-1258 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php