DW Php update record form with menu from another table
| From: | Robb Kerr | Date: | Mon, 10 Nov 2003 16:32:04 +0000 |
| Subject: | DW Php update record form with menu from another table | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169048@lists.php.net to get a copy of this message | ||
I'm using Dreamweaver's "Update Record" form wizard to create a record
update page. Most of the fields are "text", one is "file" and I want one of
them to be a "menu". The "menu" field should be populated with the fields
of another table.
Here's the problem... If I leave all of the fields as text input fields,
the form works fine. But, as soon as I change the "manufacturers" field to
a drop-down menu populated with entries from another table, I get the
following error when accessing the page...
Parse error: parse error, expecting
Attachment: [application/zip] Attached file: adminEditSpecials.zip adminEditSpecials.zip
T_STRING' or T_VARIABLE' or
`T_NUM_STRING' in
/home/s/k/user992816/html/RobesonWeb/admin/adminEditSpecials.php on line
106
line 106 reads...
<option value="<?php echo
$row_rs_RobesonWebManufacturer['manufacturer']?>"
<?php if (!(strcmp($row_rs_RobesonWebManufacturer['manufacturer'],
"$row_rs_RobesonWebSpecials[\'manufacturer\']"))) {echo "SELECTED";}
?>><?php echo $row_rs_RobesonWebManufacturer['manufacturer']?></option>
Needless to say, this line is embedded in this Php code to create the
drop-down menu...
<select name="manufacturer">
<?php
do {
?>
<option value="<?php echo
$row_rs_RobesonWebManufacturer['manufacturer']?>" <?php if
(!(strcmp($row_rs_RobesonWebManufacturer['manufacturer'],
"$row_rs_RobesonWebSpecials[\'manufacturer\']"))) {echo "SELECTED";}
?>><?php echo $row_rs_RobesonWebManufacturer['manufacturer']?></option>
<?php
} while ($row_rs_RobesonWebManufacturer = mysql_fetch_assoc
$rs_RobesonWebManufacturer));
?>
</select>
What's up? These "drop-downs from another table" work fine in "Add" forms.
They just seem to crap out in "Update" forms. It was suggested that I
needed to create recordsets for both the menu and the rest of the form. I
did that and the form still doesn't work. Attached is the entire page
for consulting. I've also posted this message on Dreamweaver's newsgroup
but haven't been getting any responses so thought I'd see if this group had
any suggestions.
Thanx,
--
Robb Kerr
Digital IGUANA
Helping Digital Artists Achieve their Dreams
http://www.digitaliguana.com
http://www.cancerreallysucks.org
Attachment: [application/zip] Attached file: adminEditSpecials.zip adminEditSpecials.zip