Solved

Redirect without changing i.e. address bar

Posted on 2004-10-17
4
296 Views
Last Modified: 2008-02-01
Hi,

Using  Header("Location: login.php"); at the moment to goto another page, any way to redirect but keep the current header shown ?
0
Comment
Question by:MirageSF
4 Comments
 
LVL 14

Accepted Solution

by:
RichieHindle earned 25 total points
ID: 12333145
Make your main page a frameset with a single frame that fills the whole browser.  Make that frame point to the real page.
0
 
LVL 27

Assisted Solution

by:Diablo84
Diablo84 earned 25 total points
ID: 12333158
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question