PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 5th, 1999, 10:26 AM
RickD
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I have a php3 script that displays messages, and one that posts. After posting, I want to redirect back to the display ... or even just have a button to go back to the display. My problem is that when I go back (either redirected or user-directed), the display.php3 doesn't get the latest query from mySQL database. Any ideas where I'm going wrong? Here is the display.php3 stuff:

<?
mysql_connect("localhost", "webuser", "");
$query = "Select mindex, mthread, msubject, mname, mip, mtime, mdate from messagedb";
$result = mysql_db_query("messagedb", $query);

if ($result) {
while ($r = mysql_fetch_array($result)) {
$index = $r["mindex"];
$thread = $r["mthread"];
$subject = $r["msubject"];
$name = $r["mname"];
$ip = $r["mip"];
$time = $r["mtime"];
$date = $r["mdate"];
echo "$subject<br></A>";
echo "$name<br>";
echo "$date<br>";
echo "$time<br>";
}
}
else { echo "NO DATA"; }

mysql_free_result($result);
?>

Reply With Quote
  #2  
Old November 5th, 1999, 11:11 AM
rod k
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Remember, the net is stateless. You either have to query again or pass the query results.

Reply With Quote
  #3  
Old November 8th, 1999, 05:50 PM
TheHawk
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Your browser is caching the previous output of the display.php3 script. You could combine both the display and the post scripts into one, and eliminate the caching issue and the redirect code...

Also - think about using some passwords on your database!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP3, mySQL, Apache -- Redirect

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap