1. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    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"; }

  2. #2
  3. No Profile Picture
    rod k
    Devshed Newbie (0 - 499 posts)
    Remember, the net is stateless. You either have to query again or pass the query results.
  4. #3
  5. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    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!

Similar Threads

  1. Mysql problem.
    By Nik in forum MySQL Help
    Replies: 54
    Last Post: December 21st, 2006, 07:02 PM
  2. MySQL to MS SQL 2000
    By diskord in forum MySQL Help
    Replies: 0
    Last Post: February 6th, 2004, 08:00 PM
  3. apache redirect
    By sopiaz57 in forum Apache Development
    Replies: 1
    Last Post: January 16th, 2004, 08:23 PM
  4. installing apache, php and mysql
    By lucilue2003 in forum PHP Development
    Replies: 9
    Last Post: January 8th, 2004, 10:18 AM

IMN logo majestic logo threadwatch logo seochat tools logo