Redirect without changing i.e. address bar

Hi,

Using  Header("Location: login.php"); at the moment to goto another page, any way to redirect but keep the current header shown ?
MirageSFAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
RichieHindleConnect With a Mentor Commented:
Make your main page a frameset with a single frame that fills the whole browser.  Make that frame point to the real page.
0
 
Diablo84Connect With a Mentor Commented:
Frames is a bit of an *icky* method... but might suit here.

You could instead include the file based on a conditional statement, eg. (presuming its some kind of a login form)

if (isset($_POST['submit'])) {
 //process login
 include('login.php');
}
else {
 //show form
?>

you can also escape out of php here so you dont have to echo everything, this is still within the conditional

<?php
}
?>

Then the address bar will show the address of the main page not login.php
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.