How to 'refresh' a php page?

Reply

Join Date: Oct 2009
Posts: 186
Reputation: venkat0904 is an unknown quantity at this point 
Solved Threads: 20
venkat0904's Avatar
venkat0904 venkat0904 is offline Offline
Junior Poster
 
0
  #11
Nov 19th, 2009
Originally Posted by Rajivgandhi View Post
Still its not working. The above code shown in output window. can u give me the full code to insert and retrieve image from the database by using blob.
its getting displayed in browser !!! Are you sure u placed these lines inside <?php tag??
Why dont u post up the code u r using and i shall suggest what modifications are required..
Gimme reputation points if u find my post helpful.
use [code] tags wherever applicable
dont start a new thread unless u cant find the topic already on forum.
mark a thread "solved" as soon as u get a solution
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,776
Reputation: almostbob is a jewel in the rough almostbob is a jewel in the rough almostbob is a jewel in the rough 
Solved Threads: 212
almostbob's Avatar
almostbob almostbob is offline Offline
Posting Virtuoso
 
0
  #12
Nov 19th, 2009
Have messed this up b4
If the nocache code is getting displayed in the browser in the output window
Assuming the page displayed is "page.php"
page.php includes the line <img src="getImageFromDatabase.php" alt='database blob image'> or something similar
The nocache code previously listed should be inserted in the <head> of "page.php" not "getImageFromDatabase.php" else that code is output to the browser as well as (or instead of) the image
the nocache code should work
Last edited by almostbob; Nov 19th, 2009 at 2:12 pm.
Failure is not an option It's included free, you don't have to do anything to get it
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 186
Reputation: venkat0904 is an unknown quantity at this point 
Solved Threads: 20
venkat0904's Avatar
venkat0904 venkat0904 is offline Offline
Junior Poster
 
0
  #13
Nov 20th, 2009
Originally Posted by almostbob View Post
Have messed this up b4
If the nocache code is getting displayed in the browser in the output window
Assuming the page displayed is "page.php"
page.php includes the line <img src="getImageFromDatabase.php" alt='database blob image'> or something similar
The nocache code previously listed should be inserted in the <head> of "page.php" not "getImageFromDatabase.php" else that code is output to the browser as well as (or instead of) the image
the nocache code should work
hey almostbob,
correct me if m wrong but the header function is supposed to execute before displaying any output in the browser isnt it? then how are u supposed to place it inside head tag.
I believe it must go on the top of page which is used to display the image ie which outputs html for image display... watsay?
what you are trying to tell is the use of meta tag inside head which is also an option but doesnt works with IE. so the best way is to use http headers...
Gimme reputation points if u find my post helpful.
use [code] tags wherever applicable
dont start a new thread unless u cant find the topic already on forum.
mark a thread "solved" as soon as u get a solution
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,776
Reputation: almostbob is a jewel in the rough almostbob is a jewel in the rough almostbob is a jewel in the rough 
Solved Threads: 212
almostbob's Avatar
almostbob almostbob is offline Offline
Posting Virtuoso
 
0
  #14
Nov 20th, 2009
for me it is 3am
corrected text should read
The nocache code previously listed should be inserted in "page.php" not "getImageFromDatabase.php" else that code is output to the browser
Failure is not an option It's included free, you don't have to do anything to get it
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 6
Reputation: Rajivgandhi is an unknown quantity at this point 
Solved Threads: 0
Rajivgandhi Rajivgandhi is offline Offline
Newbie Poster
 
0
  #15
Nov 20th, 2009
I want to upload audio and video into the database.. Is it possible? If possible, then tell me how to do that?
Last edited by Rajivgandhi; Nov 20th, 2009 at 1:35 am.
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 1,110
Reputation: digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice 
Solved Threads: 68
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Veteran Poster
 
0
  #16
Nov 20th, 2009
To ensure an image is reloaded, send a unique URL.

eg:

<img src="image.php?random-number123" />

Where random_number123 can be generated by:

  1. <?php
  2.  
  3. $random = microtime(true);
  4.  
  5. // eg
  6.  
  7. echo '<img src="image.php?'.$random.'" />';
  8.  
  9. ?>
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 1
Reputation: JasperWestra is an unknown quantity at this point 
Solved Threads: 0
JasperWestra JasperWestra is offline Offline
Newbie Poster

#

 
0
  #17
Nov 26th, 2009
just use: <?php header("Location: #"); ?>

for example:
  1. <?php
  2.  
  3. if (true) {
  4.  
  5. header("Location: #");
  6.  
  7. } else {
  8. // nothing happens
  9. }
  10.  
  11. ?>
or, make a text link:
  1. <a href="#">click this link</a>
"#" is often used to redirect people to the top of a page, but it will actually refresh the page as wel.

Greetings,
Last edited by digital-ether; Nov 26th, 2009 at 7:42 pm. Reason: snipped url
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 105545 | Replies: 16
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC