Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PHP update behavior not seeing dynamic variables

Explorer ,
Jul 23, 2009 Jul 23, 2009

I'm trying to modify an existing PHP page (admittedly not my strongest suit) .... where certain values are dynamically fed via a functions.php file included in the page header.. one such field is <?=memberDropdown($_SESSION["memberProfile"]["membernumber"])?> ... and the page does retreive and display a drop down with the dynamic content as it should, but when I go to build the DW8 PHP Update behavior, it doesn't "see" the dynamic drop down. Any suggestions on how to resolve this?????  Thanks!

TOPICS
Server side applications
908
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 23, 2009 Jul 23, 2009

Do u want to do dynamic drop down menu? Choose from Insert > Form > List/Menu. Click on it and see at properties below. You can see 'Dynamic' button with lightning icon. Click it and u will see popup window will appeared. At the 'options from recordset' field, select the recordset that u want to use. But make sure u create the recordset first. For example if u want the menu to display members from database, create recordset from members table (Server Behaviour > Recordset). Values field is what column u want to store in database and Label field is what u want to display to users.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 23, 2009 Jul 23, 2009

Hello.. no. The dynamic drop-down that is there works just fine. THe problem is that the UPDATE behavior that DW8 generates doesn't SEE the drop-down.. there's no ID or NAME for it to use.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 27, 2009 Jul 27, 2009

I dont understand from what u mean

>the UPDATE behavior that DW8 generates doesn't SEE the drop-down

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 27, 2009 Jul 27, 2009

Umm.. how do I explain this more clearly?  In a PHP page, if I have a dynamic drop-down populated with values, that drop-down has an ID. When I use Dreamweaver to create an UPDATE behavior on the page, to update the database table, I can choose to update a specific field on the table based on the ID name of that dynamic drop-down. The Dreamweaver Behavior itself, can see the ID of that drop-down on the form, and I can assign it to update a specific field.

In the form that I'm trying to modify, there IS a dynamic drop-down (see code on original post) but because it has no ID assigned to it, the DW Behavior can't offer it as an option in the UPDATE dialog. I want to know how to work around this or fix it so that Dreamweaver can see the drop-down, and therefore I can assign the selected value.

Does that help?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 27, 2009 Jul 27, 2009

Your solution is simple add a dynamic ID and name to the form fields. Create a dynamic list/menu as QIQ mentioned and add a dynamic name and ID to form fields from there.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 27, 2009 Jul 27, 2009

Hello yes... I thought of that certainly, but didn't want to add more actual fields if there were subroutines already creating them once.. I just wanted to label the existing dynamic combo box and then DW would recognize it for the Update. Guess I'm out of luck...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 28, 2009 Jul 28, 2009
LATEST

Do u mean u want the drop down menu to show the respective value as stored in database when u want to update? The u just need to set the value for drop down list with the column of the table.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines