Jump to content

Drop Down default to recordID


teerock

Recommended Posts

Hello fellow php'ers,

 

I'm relatively new to PHP (3 months) but a fast learner. My application is being built primarily in Dreamweaver and requires the following:

 

A user can access the Add_Artist_Image.php page from two links.

 

This page has a recordset talking to a table called Artists

 

Depending on how the user arrives at the page determines the default value displayed in a drop down list. If the user arrives via this link:

 

<a href="artist_add_image.php?recordID=<?php echo $row_Images['id']; ?>">

 

the drop down list should display the Artist Name relevant to the recordID.

 

If the user arrives via this link:

 

<a href="artist_add_image.php">

 

the drop down list should default to the first record in the page recordset (Artists).

 

I can achieve all of this. However, I need the drop-down list to behave dynamically. IE: If the user arrives with the recordID URL link in tact but then clicks on the drop down list arrow, the drop down list should expand to include the entire Artists recordset. So the recordset needs to reflect the behaviour of the user.

 

I hope this makes sense and I sure pray for answer.

 

Thankyou in advance.

 

Teerock

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.