Thanks for the help. I'm almost there. I'm getting multiple entries but I'm getting a null in the imgID Field. I've tried a bunch of variations but I can't seem to call up the img.id. Probably going blind...
Here's my Code:
PHP Code:
// Insert images into order gallery
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if (isset($_POST['MM_insert']) && !empty($_POST['MM_insert'])) {
$orderID = $_POST['MM_insert'];
if (isset($_POST['cBox']) && !empty($_POST['cBox'])) {
foreach ($_POST['cBox'] as $imgID) {
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "imageForm")) {
$insertSQL = sprintf("INSERT INTO glryImages (userID, imgID, glryID) VALUES (%s, %s, %s)",
GetSQLValueString($_POST['userID'], "int"),
GetSQLValueString($_POST['imgID'], "int"),
GetSQLValueString($_POST['glryID'], "int"));
mysql_select_db($database_mbtseaDB, $mbtseaDB);
$Result1 = mysql_query($insertSQL, $mbtseaDB) or die(mysql_error());
}
}}}