close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

drop down menu: polpulated from search?

Thread began 2/13/2016 4:07 pm by anonymous | Last modified 2/16/2016 2:42 pm by Ray Borduin | 401 views | 11 replies |

anonymous

drop down menu: populated from search? and then used to update

I have an update page that I have created drop down menus on, so that staff can see what are the proper options for each field. It is important that they are entered correctly as these are 'Enum' types in the database and used for customer access to website features. I would like to:

1. Have the drop down populate to the current database entry on the update page. I can do this now (see line 204) but it just adds a redundant line. This redundant line is okay ultimately if I could also:
2. Then have the choice selected in the drop down list (whether it is a new choice or not) used to update the database on submit.

These are not foreign keys. Everything is in one table, so the example used in the tutorial at http://www.webassist.com/tutorials/Manage-relational-tables will not work.

Thanks. If I get this done, I am done with this project! Yay

Attached Files
boaters_update.php
Sign in to reply to this post

Ray BorduinWebAssist

The right code to use would be something like:

<option><?php echo((isset($_GET["invalid"])?ValidatedField("boatersupdate","endorsement_sail"):"".$row_WADAboaters["endorsement_sail"]."")); ?></option>
<option value="no" <?php echo((isset($_GET["invalid"])?ValidatedField("boatersupdate","endorsement_sail"):"".$row_WADAboaters["endorsement_sail"]."") == "no"?"selected":""); ?>>no</option>
<option value="yes" <?php echo((isset($_GET["invalid"])?ValidatedField("boatersupdate","endorsement_sail"):"".$row_WADAboaters["endorsement_sail"]."") == "yes"?"selected":""); ?>>yes</option>

It looks like it is set up properly to update the database when the form submits.

Sign in to reply to this post

anonymous

does the code get embedded somehow? I have tried this- just tried again without the auto- generated code (line 204 deleted) - it returns a blank value for that field. embedded into that line (line 204) i cannot get it to work at all. not sure i CAN embed <select>...

Attached Files
boaters_detail.php
boaters_insert.php
boaters_update.php
Sign in to reply to this post

Ray BorduinWebAssist

You should be removing that top option. I'm not sure what you mean by embedded in this context. I'm also not sure why you have given me three pages, I thought we were working on the update page.

Do you have a url where i can view the page live?

Sign in to reply to this post

anonymous

i have tried removing the top option. i sent three pages because i thought they might be related. just trying to be efficient!

register there and i will assign you admin rights. i will reply here after i do that. then, after you login in with admin rights, you will be able to click on the "2016" in the footer and see the admin page that has links to these pages.

Sign in to reply to this post

anonymous

done. login then click on the 2016 lower left in footer. click on email address in member list to see details and get to update page. should be intuitive from there.

Sign in to reply to this post

Ray BorduinWebAssist

It appears to be working to me. What exactly is wrong with the page?

Sign in to reply to this post

anonymous

from original post:

1. Have the drop down populate to the current database entry on the update page. I can do this now (see line 207) but it just adds a redundant line. This redundant line is okay ultimately if I could also:
update:check:done. had this 5 minutes after i started.

2. Then have the choice selected in the drop down list (whether it is a new choice or not) used to update the database on submit.
this one is what i am asking for help with. i cannot get the drop down choice to record (update the database) when "update' is submitted. Using the last field as the test, I have tried deleting line 204. then it records nothing; not null, just blank.

Attached Files
boaters_update.php
Sign in to reply to this post

Ray BorduinWebAssist

You would delete lines 204 and 207 and then rename the select list to "endorsement_sail" instead of "sail".

I think you are confusing yourself by having both a text and select field in the form.

Sign in to reply to this post

anonymous

that does not work either. i did that and you can see the result if you go there now and refresh.

If this is outside of the scope of normal support, i am happy to pay for your time to get it right. it is the last piece of the puzzle on this whole site so kind of anxious to put it behind me.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...