Jump to content

Post Dynamic Info to Database


bobbyrabbit

Recommended Posts

I'm trying to post to 2 fields in the MySQL Database:

I'm generating data from fields DocTitle and DocCost in table 'worktype' in a dropdown box which is working fine. I am trying post this info to another table 'bidrequests' using the same field names on submitting the form. I think the problem is that I'm trying to post more than 1 peice of info via the form. The data to upload is part of an Applet. On clicking the submit button I am getting javascript error Object Required. Here is the code, thanks for any help:



document.InterfaceApplet.SETPARAMETER ("DocTitle", document.getElementById("WorkType").value);
document.InterfaceApplet.SETPARAMETER ("DocCost", document.getElementById("WorkType").value);

-------------------------------------------------------------------------------

<select name="WorkType" id="select">
<?php
$selected = "";
do {
if (isset($_POST['WorkType']) && $row_rsDocTitle['DocTitle']==$_POST['WorkType'])
$selected = "select";
else
$selected = "";
?>
<option value="<?php echo $row_rsDocTitle['DocTitle']?><?php echo $row_rsDocTitle['DocCost']?>" <?php echo $selected; ?>><?php echo $row_rsDocTitle['DocTitle']?>
- <?=$CurrencySymbol?><?php echo $row_rsDocTitle['DocCost']?></option>
<?php
} while ($row_rsDocTitle = mysql_fetch_assoc($rsDocTitle));
$rows = mysql_num_rows($rsDocTitle);
if($rows > 0) {
mysql_data_seek($rsDocTitle, 0);
$row_rsDocTitle = mysql_fetch_assoc($rsDocTitle);
}
?>
</select>


----------------------------------------------------------
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.