GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 26-Apr-2004, 09:38
tawhitley tawhitley is offline
New Member
 
Join Date: Apr 2004
Location: Atlanta, GA
Posts: 2
tawhitley is on a distinguished road
Unhappy

Reload Page Automatically


I am working on a simple database program using PHP and MySQL. Several of my pages are forms that ask for new or updated information. When I click on the submit button, the next load makes the change to the database and I want it to then return to the initial display page but the page is blank unless I put a link that will reload the desired page.

How can I make this reload automatic?

I tried using "header("location:..." but I get an error message saying that the header can't be modified...

Thanks.
  #2  
Old 30-Apr-2004, 04:22
Garth Farley Garth Farley is offline
Invalid Email Address
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
You usually get a "Header cannot be modified" message if you try and set headers after something has been printed out. Once you echo something out, the headers are automtically sent and cannot be altered. So try planing the header refresh higher up in your PHP file.

GF
  #3  
Old 01-May-2004, 21:53
PCHACKER PCHACKER is offline
New Member
 
Join Date: May 2004
Posts: 2
PCHACKER is on a distinguished road

I am using this to return successfully...


<html>
<META HTTP-EQUIV="Refresh" CONTENT="1;URL=http://www..html">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

This will pop the blank page for one second (CONTENT="1) and then bounce to the other page noted.

Hopefully that wil resolve your problem (if you haven't resolved it already).

Later,
ST
  #4  
Old 03-May-2004, 09:02
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello Tim,

I remember you from your email - sorry for the bad timing but I was away for a few days.

Since you didn't post your PHP code, I can only suggest a 'band-aid' type fix incase you still haven't gotten around this issue:

Just open up your script, and insert this right at the top:
PHP Code:

<?php
ob_start();
// followed by all your code...
?>

and see if that helps...
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What's wrong with this page? Socrates Demise Websites Reviewed Forum 2 31-Mar-2004 09:50
simple form from generated page zuzupus Web Design Forum 0 17-Sep-2003 09:27
[script] E-mail webmaster error page BobbyDouglas PHP Code Library 0 19-Aug-2003 20:10
Search Engine Positioning 101 and 201 "How To" Tips... 000 Search Engine Optimization Forum 0 29-May-2003 10:34

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:47.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.