Frame redirection with PHP

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 15th, 2007, 16:25
Junior Member
Join Date: Mar 2007
Location: Long Island, NY
Age: 23
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to linchpin311
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!!!
Reply With Quote

  #2 (permalink)  
Old May 17th, 2007, 16:20
New Member
Join Date: Jul 2005
Location: UK (Scotland)
Age: 29
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
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).
Reply With Quote
  #3 (permalink)  
Old May 17th, 2007, 17:35
Junior Member
Join Date: Mar 2007
Location: Long Island, NY
Age: 23
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to linchpin311
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"
Reply With Quote
Reply

Tags
frames, function, header, php, redirection

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 05:32.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43