Forum Moderators: coopster

Message Too Old, No Replies

php, mysql, and forms

dynamic form selection

         

RogueDogg

1:23 am on Jun 28, 2006 (gmt 0)

10+ Year Member



Ok I'm frustrated, I've searched high and low and have come up empty. Here it goes:

I have a dropdown menu populated by a mysql db, what I'm selecting is a product(s). Now what I'd like to do is when a product is selected from this drop down menu, it displays the product description in an editable text area next to the drop down menu, so that the user may or may not edit the description if they wish. Now I'm not sure if this will hinder things but in the description there will be variables called ( ie the description has a url in it called from another db. ex. value="<? echo "$website";?>/<? echo "$cid";?>/filename.html" ). I have the script working that selects the products and puts them into the drop down menu but that's as far as I've gotten, I can't find any material anywhere on how to complete this...HELP?

Thanks in advance ( I will post what code I have so far if needed ).

StupidScript

11:43 pm on Jun 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



when a product is selected from this drop down menu

One of two things will need to happen:

1) Either some Javascript or other client-side language needs to get the description from, perhaps, an array populated by PHP during the page's last 'visit' to the server so Javascript (et al.) can present the description in the editable text area, or

2) The request needs to be sent back to the server (using Javascript et al. to submit the form) so PHP can see what the selection was, and then it can populate the editable text area with the appropriate description before sending the page back out to the client.