Forums

PHP

This topic is locked

Probably a very simple question

Posted 21 Mar 2003 13:47:09
1
has voted
21 Mar 2003 13:47:09 Lee Harvey posted:
I am very new to PHP so please forgive my ignorance. I have a recordset on a page that is filtered by a session variable, the recordset contains a field called isPrivate. What I need to be able to do is redirect to a different page based on the value of the isPrivate field. In ASP (with which I am familiar) the code looks something like
% If rs.fieldsitem.value("isPrivate" = "True" then
response.redirect("page1"
else
response.redirect("page2"
end if
%
what is the equivalent in PHP

many thanks in advance

Lee

Replies

Replied 21 Mar 2003 17:52:49
21 Mar 2003 17:52:49 Brent Colflesh replied:
Dear Lee,
Untested -

<?php
if ($rsRecordDetail->Fields("isPrivate"= "True" {
header("Refresh: 0; URL=/page1.php";
} else {
header("Refresh: 0; URL=/page2.php";
}
?>

Regards,
Brent

Replied 23 Mar 2003 21:44:08
23 Mar 2003 21:44:08 Lee Harvey replied:
Thankyou for your reply, I will give that a try

Lee

Reply to this topic