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
https://forums.phpfreaks.com/topic/68158-refresh-problem/
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
https://forums.phpfreaks.com/topic/68158-refresh-problem/#findComment-342660
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.