Jump to content

refresh problem


proctk

Recommended Posts

Hi My tring to send a variable through a url then once that variable will be called to display the message.  After the message is displayed I want want the user redirected to a new page after a time delay,  any help is excellent

 

/*Log Error*/
$page = $_SERVER['REQUEST_URI'];
$referring_page = $_SERVER['HTTP_REFERER'];
$user_id = $_SESSION['user_id'];
$userIP = $_SERVER['REMOTE_ADDR'];

$query_error_logging = ("INSERT INTO error_tracking (page, referring_page, error_msg, user_id, ip_address, error_date)VALUES('$page', '$referring_page', '$msg', '$user_id', '$userIP', now())");
$log_error = mysql_query($query_error_logging)or die("SQL Error: $query_error_logging<br>" . mysql_error());

header("Location: $url?msg=$msg&id=null");

header('refresh: 2; url=familyProfile.php');
exit();
}

Link to comment
Share on other sites

code that displays the message

 

<?php
$msg = (isset($_GET['msg']) AND $_GET['msg']<> "") ? urldecode($_GET['msg']) : ''; 
if ($msg <> "") {
  if (get_magic_quotes_gpc()) {
    $msg = stripslashes($msg);
  }
  echo "<div id='alertMessage'><p style='margin-left:40px;'>$msg</p></div>";
}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.