Solved

Redirect without changing i.e. address bar

Posted on 2004-10-17
4
295 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

770 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