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 9188031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:55:02+00:00 2026-06-17T19:55:02+00:00

So basically all I want to do is a basic image uploading page. When

  • 0

So basically all I want to do is a basic image uploading page. When the user fills out a form they submit a file either from their computer or from a URL then the image gets stored on the server.

I want to then display the images on a HTML page. I already have the code to dynamically create the divs that would hold the uploaded content.

function AddTiles() {
    var mydiv = document.createElement("div");
    mydiv.setAttribute("id", "mydiv");
    mydiv.setAttribute("class", "tiles");
    mainContent.appendChild(mydiv);
}

But whenever you upload the image the page refreshes, and then the divs would no longer be there to place the image in. So I want to save the image to a database instead, and then on page load, read through the database and generate the html content and then display the images.

So if there were 4 images in your database, then the program would create 4 div tags and put each image in its respective div tag.

Also, I just need the code to read from the database and create the html content on load. I can create the database and store the images with no problem.

  • 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-06-17T19:55:03+00:00Added an answer on June 17, 2026 at 7:55 pm

    If you are going to read and output information stored in a database, you might as well generate the HTML content on the server-side (PHP) without using JavaScript i.e. echo "<img src='$url' />".

    You can also read PHP MysQL Select tutorial for more information on retrieving data from your database.

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

Sidebar

Related Questions

Basically I want to read and write to a file then save all the
I basically want the same functionality as facebook, twitter and all those other infinite
Basically, I want to get all rows from the customers table that do NOT
I want to get all the Applications that have intentlisteners to Intent.CATEGORY_HOME so basically
Basically, I want to get a list of all installed apps and pick one
I want to find all strings containing at least 1 Cyrillic character (basically /.*[А-я].*/)
I have been stumped all day on this problem. Basically I want to check
Im going to make a new application for a car dealership. They basically want
I have a (very) basic validation script. I basically want to check for any
Hey all, so basically I have a very simple layout with a header image,

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.