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

  • SEARCH
  • Home
  • 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 8183647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:13:37+00:00 2026-06-07T01:13:37+00:00

I am new to php/mysql. I am trying to store an image in my

  • 0

I am new to php/mysql. I am trying to store an image in my database via the URL(image location) at the moment my php code is storing the image in a folder in the directory called upload. This is insecure so i want to put the url in a database. My code is based of this IMAGEUPLOAD-WEBSITE Here is a url example generated by my code:

http://www.example.com/imageupload/uploads/medium/uniqueimagename.jpg

  1. How would i construct a valid table that will store URL’s? Should it be with Varchar?
  2. How can I retrieve this url from my database and display the image? php query of the filename in the database or original url?
  • 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-07T01:13:38+00:00Added an answer on June 7, 2026 at 1:13 am

    1. How would i construct a valid table that will store URL's? Should it be with Varchar?

    I wouldn’t store the complete path of the URL into the database. So, if you have:

    http://www.example.com/imageupload/uploads/medium/uniqueimagename.jpg

    I would only store:

    size: 2 (medium)
    name: uniqueimagename
    ext: jpg
    

    2. How can I retrieve this url from my database and display the image? php query of the filename in the database or original url?

    Just fetch the data from the database and put the raw data in your html

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

Sidebar

Related Questions

I'm new to PHP and MySQL and I'm trying to store a users entered
I am trying to store URL Image paths into MySQL DB. But i am
I am trying to use a PHP form (new.php) to update 2 MySQL tables
I am writing a new website that uses PHP and MySQL. I am trying
PHP/MySQL (CodeIgniter) I would like to add new interest_keywords in the exist database value.
im kinda new with mysql and i'm trying to create a kind complex database
I'm relatively new to PHP/mySQL and I'm trying to develop a portfolio of my
i have a mysql database storing uploaded photos , i am trying to generate
I am very new to php and mysql. I am trying to learn as
New to PHP and MySQL, have heard amazing things about this website from Leo

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.