We have an existing set of includes that are used on specific pages for allowing only "Members" to access the page. The includes perform security logins and SQL queries to our old database. I need to replace the includes to forward the user to the new system logon page and when they return allow them to see the page.
Now, I have not programmed in PHP in over 7 years. Not my fault. So I am attempting to remember how to do this. Can someone review this snip of code and tell me if it will work?
<?php
if ($_SERVER['REQUEST_URI'], 'https://my.globalhealth.org/ebusiness/login.aspx')
exit;
else
header("location:https://my.globalhealth.org/ebusiness/login.aspx");
exit;
End if
?>
PHP forward and return to anther website
Moderator: General Moderators
Re: PHP forward and return to anther website
Code: Select all
<?php
if ($_SERVER['REQUEST_URI'] != 'https://my.globalhealth.org/ebusiness/login.aspx') {
header("location:https://my.globalhealth.org/ebusiness/login.aspx");
}
exit(1);
?>