So sorry but i still don't get it... really need it resolved b4 you all dissapear
I have this dropdown menu generated from a 'product' table
<td><select name="USB_Pendrive_Model__" class="ulfront" id="USB_Pendrive_Model__">
<option value="Not Sure" <?php if (!(strcmp("Not Sure", $row_rscustom['USB_Pendrive_Model__']))) {echo "selected=\"selected\"";} ?>>Not Sure</option>
<?php
do {
?><option value="<?php echo $row_model['product_id']?>"<?php if (!(strcmp($row_model['product_id'], $row_rscustom['USB_Pendrive_Model__']))) {echo "selected=\"selected\"";} ?>><?php echo $row_model['product_name']?></option>
<?php
} while ($row_model = mysql_fetch_assoc($model));
$rows = mysql_num_rows($model);
if($rows > 0) {
mysql_data_seek($model, 0);
$row_model = mysql_fetch_assoc($model);
}
?>
</select>
<?php echo $tNGs->displayFieldError("custom", "USB_Pendrive_Model__"); ?> </td>
I need to pull the name of the model from the 'model' table
I have these relevant recordsets:
Product table:
mysql_select_db($database_usb, $usb);
$query_model = "SELECT product_id, product_name FROM product";
$model = mysql_query($query_model, $usb) or die(mysql_error());
$row_model = mysql_fetch_assoc($model);
$totalRows_model = mysql_num_rows($model);
and the filtered model table:
$colname_modelname = "-1";
if (isset($_POST['USB_Pendrive_Model__'])) {
$colname_modelname = (get_magic_quotes_gpc()) ? $_POST['USB_Pendrive_Model__'] : addslashes($_POST['USB_Pendrive_Model__']);
}
mysql_select_db($database_usb, $usb);
$query_modelname = sprintf("SELECT * FROM model WHERE model_id = %s", GetSQLValueString($colname_modelname, "int"));
$modelname = mysql_query($query_modelname, $usb) or die(mysql_error());
$row_modelname = mysql_fetch_assoc($modelname);
$totalRows_modelname = mysql_num_rows($modelname);
and in the sendmail i'm trying to call: {modelname.model_name}
But the subsequent email is blank
What am i doing wrongplease?
I attach the relevant file