i looked at this video : insert_multiple_final.swf
I applied for the Img field which i created on my insert page..
i applied repeat selection & also multiple record insert.. but then the images are not actually uploading into the mysql & database.
my insert page form looks like this:
<form action="Prop_Insert.php" method="post" enctype="multipart/form-data" name="WADAInsertForm" id="WADAInsertForm">
<div class="WADAHeader">Insert Record</div>
<table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
<tr>
<th class="WADADataTableHeader">Category:</th>
<td class="WADADataTableCell"><input type="text" name="ItemCatID" id="ItemCatID" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Property Name:</th>
<td class="WADADataTableCell"><input type="text" name="ItemName" id="ItemName" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Property Short Description:</th>
<td class="WADADataTableCell"><input type="text" name="ItemShortDesc" id="ItemShortDesc" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Property Long Description:</th>
<td class="WADADataTableCell"><input type="text" name="ItemLongDesc" id="ItemLongDesc" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Price:</th>
<td class="WADADataTableCell"><input type="text" name="ItemPrice" id="ItemPrice" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Builder Thumb:</th>
<td class="WADADataTableCell"><label>
<input type="file" name="ItemThumb" id="ItemThumb" />
</label></td>
</tr>
<tr><br />
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_None){
?>
<th class="WADADataTableHeader">Property Image:</th>
<td class="WADADataTableCell"><label>
<input type="file" name="ItemImage_<?php echo $RepeatSelectionCounter_1; ?>" id="ItemImage_<?php echo $RepeatSelectionCounter_1; ?>" />
</label></td>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_None && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_None = mysql_fetch_assoc($None);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
<br />
</tr>
</table>
<div class="WADAButtonRow">
<table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="WADADataNavButtonCell" nowrap="nowrap"><input type="image" name="Insert" id="Insert" value="Insert" alt="Insert" src="WA_DataAssist/images/Pacifica/Modular_insert.gif" /></td>
<td class="WADADataNavButtonCell" nowrap="nowrap"><a href="Prop_Results.php" title="Cancel"><img border="0" name="Cancel" id="Cancel" alt="Cancel" src="WA_DataAssist/images/Pacifica/Modular_cancel.gif" /></a></td>
</tr>
</table>
<input name="WADAInsertRecordID" type="hidden" id="WADAInsertRecordID" value="" />
</div>
</form>
***************************************
and INSERT MUTLIPLE RECORDS LOOKS LIKE THIS ->
<?php
// WA DataAssist Multiple Inserts
if (isset($_POST["Insert_x"])) // Trigger
{
if (!session_id()) session_start();
$WA_loopedFields = array("");
$WA_connection = $Connection_1;
$WA_table = "items";
$WA_redirectURL = "Prop_Detail.php";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_fieldNamesStr = "ItemImage";
$WA_columnTypesStr = "',none,''";
$WA_insertIfNotBlank = "ItemImage";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_Connection_1;
$WA_multipleInsertCounter = 0;
mysql_select_db($WA_connectionDB, $WA_connection);
while (WA_AB_checkMultiInsertLoopedFieldsExist($WA_loopedFields, $WA_multipleInsertCounter)) {
if ($WA_insertIfNotBlank == "" || WA_AB_checkLoopedFieldsNotBlank(array($WA_insertIfNotBlank), $WA_multipleInsertCounter)) {
$WA_fieldValuesStr = "".$WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"] ."";
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
}
$WA_multipleInsertCounter++;
}
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>