Jump to content


Photo

Object Required - Posting Data To Database


  • Please log in to reply
No replies to this topic

#1 bobbyrabbit

bobbyrabbit
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 14 May 2006 - 05:07 PM

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>




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users