Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6023555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:01:22+00:00 2026-05-23T04:01:22+00:00

I am relatively new to PHP/MySQL and have been having a problem that I

  • 0

I am relatively new to PHP/MySQL and have been having a problem that I cannot figure out. I’ve scoured this site but cannot find any information.

My problem is very simple: How to associate an uploaded image file with a pre-existing album.

I have 2 separate tables in my database: one for albums and one for images. What I want to do is have an <option> drop down menu retrieving the user’s pre-existing albums thus assigning an albumID to the image database.

I have successfully populated a drop down box with the user’s albums, but cannot figure out how to insert the selected ID into the picture table albumid.

Any help would be much appreciated. Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:01:23+00:00Added an answer on May 23, 2026 at 4:01 am

    When you selectd album from drop down, you could reload the page, adding the album ID in the URL. Then you only need to use $_GET to get the album id.

    Then, when you upload the image, in your upload.php file, you use the $_GET to retrieve the album ID.

    Once you have successfully moved the image from the upload temp directory to it’s final location, add the image URL to the image table and retrieve last inserted row ID. Take this ID and insert it into album table.

    Does that answer your question? 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am relatively new to MySQL and PHP and I have been trying to
I am relatively new to MYSQL and have had an issue that has been
I am relatively new to php and have a feeling that I am going
I'm relatively new to PHP and have been writing a project using what I
I'm relatively new at PHP and came across a slight problem. I have a
I'm relatively new to using PHP and have been working on using it to
This may be a silly question, but as someone relatively new to PHP, I'm
i'm relatively new to php and mysql and would like to know how to
Im relatively new to PHP but have realized it is a powerfull tool. So
I am relatively new to programming with PHP. I have created a simple Javascript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.