Solved

Redirect without changing i.e. address bar

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now