Jump to content


Photo

php html website


  • Please log in to reply
4 replies to this topic

#1 fullyloaded

fullyloaded
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts

Posted 05 September 2006 - 10:10 PM

hi
i was wondering if anyone can help me?i have a php/html website and when i goto upload a image it wont show up until i hit the refresh button on my webpage any idea how i can fix this? here are the 2 pages from my site hope some one can help thanks...

[attachment deleted by admin]

#2 roopurt18

roopurt18
  • Staff Alumni
  • Advanced Member
  • 3,749 posts
  • LocationCalifornia, southern

Posted 05 September 2006 - 10:14 PM

They don't show up until you refresh the page because the browser is displaying the old, cached version of the image.  You can force refresh the image by adding a ?mktime() to the end of the image filename.

echo '<img src="path/path2/file.ext?' . mktime() . '" alt=""/>';

It's not the most recommended method however, since it will always refresh the image and not just when it's new.
PHP Forms : Part I | Part II

JavaScript: Singleton

http://www.rbredlau.com

#3 fullyloaded

fullyloaded
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts

Posted 05 September 2006 - 11:06 PM

hi
thanks but can this code
<meta content="30; url=http://mhtit.hypermart.net/js/refresh.html" http-equiv=refresh>
be put into this code?
<input name="Submit" type="submit" class=BlackSlim11 id="Submit" value="Save">
so the refresh will be in the button and not auto refresh? thanks...

#4 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 05 September 2006 - 11:38 PM

What is your form action?
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still

#5 fullyloaded

fullyloaded
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts

Posted 05 September 2006 - 11:42 PM

hi
its a dating website and its for the members profile so they can upload there image but the new image wont show until you refresh the page if you dont refresh the page the old image will show until you do i hope thats what your asking im new to this thanks..




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users