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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:00:23+00:00 2026-06-11T01:00:23+00:00

I have a script to upload an image and display it. When i choose

  • 0

I have a script to upload an image and display it. When i choose an image and click upload, it doesn’t update the current image, but if i press f5 it will change the current image… thank you very much in advance. im just new in php.

<br><br><a href=\"javascript:location.reload(true);\"><input type='submit' name=save value=save onClick='alert(\"Profile Updated!\")'></a><input type='hidden' name='id' value=$id>";
  • 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-11T01:00:24+00:00Added an answer on June 11, 2026 at 1:00 am

    your browser is probably reusing the cached image, the best way to fix this is to add a unique tag at the end of the image url e.g.

    in php i would generally have some kind of helper to do this e.g(very basic):

    **

    function image_tag($url,$attrs){
       $id = abs((int)(microtime(true)*1000)) ); //bit overkill
       return '<img src="'.$url.'?'.$id.'" '.$attrs.' />';
    }
    
    echo image_tag('some_url.jpeg',' class="my_image_class" ');
    

    **

    if you are updating the image with javascript try do something like the following:

    **$('#some_img').attr('src',some_url+'?'+(+new Date()));**
    

    should do the trick

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

Sidebar

Related Questions

I currently have a PHP script I use to upload image files but I'm
I have a form (using MVC2) which has an image-upload script, but the rules
BACKGROUND I have a script to upload an image. One to keep the original
Let's say i have an image uploader script, i want to prevent the upload
So I have my upload script working just fine, but now it's a matter
I have created a script that will upload files to a general uploads folder,
I currently have a script which will pull in image contents from a database
I have a php script below known as cancelimage.php where it will display a
I have a php script below known as cancelimage.php where it will display a
I have a file (image) upload script in PHP that I use to upload

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.