This is a discussion on "Frame redirection with PHP" within the PHP Forum section. This forum, and the thread "Frame redirection with PHP are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Frame redirection with PHP
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Frame redirection with PHP
Hey everyone!
I have a site that is primarily split into two iframes (named left and right). When users come to my site, the left iframe contains a brief summary of the site, while the right iframe houses a file so users can login (called login.php). When users enter their username and password, the form goes to a file (called process.php) that looks up that username and password in a database. If the username and password are correct and without errors, process.php redirects to whatever site I want (we’ll call this site nextpage.php). but if there are errors, process.php redirects back to the login page, displaying the errors. The problem is that when there are errors, I want process.php to redirect back to login.php to display the errors in the right iframe (which it currently does) and when there are no errors I want process.php to redirect to nextpage.php in the parent frame. Currently, because of a target=“right” attribute in the form tag in login.php, both nextpage.php and any errors that got redirected back to login.php load in the right iframe. is there a way to get any errors reported login.php load in the right iframe and have process.php load nextpage.php in the parent frame? Is there anything I can do to the header(“Location: ”); function to tell it where to load? if anyone, after reading this, if left scratching their head asking themselves "what the hell is this kid talking about?" i created a quick mock site hopefully showing you my problem. there is also the code to go along with it. check out: http://69.122.242.19:8000/M15 Many MANY thanks in advance!!! |
|
|
|
|||
|
Re: Frame redirection with PHP
I know this is not really an answer to your problem but is there a reason you wish to use frames?
If it is to ensure the layout of your site then it can be better achieved using a single layout (maybe consider using templates or possibly simply includes). |
|
|||
|
Re: Frame redirection with PHP
i personally like frames. i am a windows user and have never had a problem with their functionality or with displaying them. i am aware of the problems that can arise with the use of frames (i am also aware of some peoples sheer hatred for frames...as if frames were the evil empire and the people were the rebel alliance), but since this site is really just for me and a few of my friends, i think im gonna stick with frames.
right now i have a kind of work-around so when the user logs in, they are taken to a regular plane-jane HTML page in the right iframe with a link to load the site i want displayed in the parent frame. good ol' target="_parent" |
![]() |
| Tags |
| frames, function, header, php, redirection |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EASY PEASY Displaying frame address in another frame question | molotov | JavaScript Forum | 3 | Nov 20th, 2007 17:29 |
| Form Redirection | madmax | PHP Forum | 4 | Jun 4th, 2007 17:35 |
| Upload redirection | Ross | PHP Forum | 8 | Feb 28th, 2007 23:32 |
| Site Redirection | Maverick25r | Web Page Design | 2 | Oct 6th, 2006 12:33 |
| redirection problem | iamzoli | PHP Forum | 12 | Apr 11th, 2004 08:48 |