DW Php update form where one field is menu from another table

From: Date: Sat, 08 Nov 2003 15:18:06 +0000
Subject: DW Php update form where one field is menu from another table
Groups: php.general 
Request: Send a blank email to php-general+get-168957@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 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. Attached is the entire page for consulting. Thanx, -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org

« previous php.general (#168957) next »