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
https://forums.phpfreaks.com/topic/62316-drop-down-default-to-recordid/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.