J
|
Jane 6/19/2008 |
Hi, if ($data["MONAssignDate"]) { $arr = db2time($data["MONAssignDate"]); $t = mktime($arr[3],$arr[4],$arr[5],$arr[1],$arr[2],$arr[0]); // compare time with current time subtracted by 1 days if($t < time()-16060*24) { header("Location: SA_Monthly_Payment_Review_view.php?editid1=".$_REQUEST["editid1"]); exit(); } } |
M
|
mrpeeble author 6/19/2008 |
Hi, try to use this code:
|
J
|
Jane 6/20/2008 |
Hi, |
M
|
mrpeeble author 6/20/2008 |
Hi, please make sure $data array is declare and fill in your event.
|
M
|
mrpeeble author 6/20/2008 |
Jane, The entire BeforeProcessEdit looks like this: { global $conn; $str = "select MONAssignDate from pr_mon_main where ID=".$_REQUEST["editid1"]; $rs = db_query($str,$conn); $data = db_fetch_array($rs); if ($data["MONAssignDate"]) { $arr = db2time($data["MONAssignDate"]); $t = mktime($arr[3],$arr[4],$arr[5],$arr[1],$arr[2],$arr[0]); // compare time with current time subtracted by 1 days if($t < time()-16060*24) { header("Location: SA_Monthly_Payment_Review_view.php?editid1=".$_REQUEST["editid1"]); exit(); } } } Oddly enough, the only occassion where the redirect is going to the view page is for a record where the MONAssignDate is equal to june 18, 2008. Records for may march and april 2008 still are not redirecting to the view page.
|