Question about meta refresh and PHP's header function

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Question about meta refresh and PHP's header function
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 14 year's 14 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.03 posts per day
Posts: 160
Points: 9,216
   
I have seen this code and am wondering if it would solve my problem. Many times after I have updated a record in a table the results are not displayed on the page until after I refresh a second time.

I normally use

Header("Location: index.php");
for a redirect.

Would this get rid of the need to refresh a second time?

<META HTTP-EQUIV=\"refresh\" content=\"3;URL=modules.php?name=$redirect\">



Back to top Reply with quote
#2   
Telli
Site Admin
Telli has been a member for over 15 year's 15 Year Member
Occupation: Self Employed
Age: 40
Fav. Sports Team: Detroit Red Wings
Website: www.codezhost.com
Status: Offline
Joined: May 26, 2003
1.45 posts per day
Posts: 8090
Points: 494,345
   
As long as your Mysql query to get the data is after your update statement then you shouldn't have to refresh the page.

If you have problems try using this instead:


header("Refresh: 0; url=your_url.php");




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum