Solved

Redirect without changing i.e. address bar

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

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…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

708 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