Robb Kerr wrote:

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

Please also post line 103, 104, 105 and 107,108,109



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>

Try

<?php if (!(strcmp($row_rs_RobesonWebManufacturer['manufacturer'],
 "$row_rs_RobesonWebSpecials['manufacturer']"))) {echo "SELECTED";}

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.

Please don't send attachments with your messages. If you need to show a lot of code, post it online somwhere ( www.pastebin.com for example )


--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
-----------------------
"Documentation is like sex: when it is good,
 it is very, very good; and when it is bad,
 it is better than nothing."

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to