PHP header(Location: somes_cript.php; target: frame_name) does not work

I have a frameset page of the following code in a page called index.php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
</HEAD>
<FRAMESET cols="10%, 90%">
  <FRAMESET rows="10%, "90%">
      <FRAME name="status" id="status" src="status.php" scrolling="no" noresize="noresize" frameborder="0" target="status" >
      <FRAME  name="menu" id="menu" src="menu.php"  scrolling="no" noresize="noresize" frameborder="0" target="menu" >
  </FRAMESET>
  <FRAMESET rows="20%, "80%">
      <FRAME name="header" id="header" src="header.php"  scrolling="no" noresize="noresize" frameborder="0" target="header">
      <FRAME  name="main" id="main" src="login.php"  scrolling="yes" noresize="noresize" frameborder="0" traget="main">
  </FRAMESET>
  <NOFRAMES>
      Sorry, your browser does not handle frames!
  </NOFRAMES>
</FRAMESET>
</HTML>

Open in new window



I want via an php script on the server running in the frame of target=main to let the rest of the framea to reload, I have read that this can be done using the header command, but I tried the following format but none is working:
 <?php
   session_start();
   header('Window-target: header');
   header('Location: header.php');
   header('Window-target: status');
   header('Location: status.php');
?>

Open in new window



And :

 <?php
   session_start();
   header('Location: header.php; Window-target: header');
   header('Location: status.php; Window-target: status');
?>

Open in new window


And I tried as well (Where here I used the location name is the php script where the frames are defined):
<?php
   session_start();
   header('Location: index.php; target: header');
   header('Location: index.php; target: status');
?>

Open in new window




But I am always getting these errors:
The requested URL /status.php; target: status was not found on this server.
The requested URL /index.php; target: status was not found on this server.
Can someone guide me how to force the other frames to reload?
Ashraf HassaneinAsked:
Who is Participating?
 
Slick812Commented:
greetings Ashraf Hassanein, , Your use of the html <FRAMESET> is INCORRECT ! ! as you have TWO <FRAMESET> tags in your index.php html , , and ONLY ONE  <FRAMESET> tag is allowed in a single page html. You will need to REMOVE one of the framesets! ! I went to -
https://www.hassans.nl 
and in firefox, I could NOT SEE the frame with login.php,  There was NO user or password text inputs shown! ! so I could not try to log in. You have a BIG ERROR in your page with two  <FRAMESET> !

ALSO the <FRAMESET> tag is so out of date, and should not be used any more, in this era of html CSS style placement and design, the  <FRAMESET> is NOT NEEDED any longer! It is not recognized or supported as valid in the new HTML5 ! !
0
 
DamjanDemsarCommented:
Hmm, you cannot work outside the frame using PHP.

You can using javascript something like:

<script type="text/javascript">
parent.location.reload();
</script>

Open in new window

0
 
Ray PaseurCommented:
Can you please step away from the technical details here and just tell us in plain language what you want to do?  Or show us a link to a site design that you want to emulate.  There are probably well-understood design patterns and if we can see the bigger picture we might be able to help you find a good design.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Ashraf HassaneinAuthor Commented:
Hi John,
     My website first page is a frame based where it has 4 frames
     1-Frame header where it have only the logo (At the begining when the user did not login yet).
     2- Frame Status where it is blank (At the begining when the user did not login yet).
     3- Frame menu where it is blank  (At the begining when the user did not login yet).
     4- Frame main where it has the login page

      When you login:
      1-The header frame has to be reloaded to show a toolbar.
      2- The status frame has to be reloaded to show the username, client IP, and his privileges
      3- The menu frame has to show the menu, and depending on the subscriber priviliges he will have different menu.
      4- The main frame will show the site content itself.


     For the moment I have have just created the php pages forthe header frame to show the toolbar and the status, once they are reloaded, and I am stuck here.
     My web site is:  https://www.hassans.nl
                              username/password: Guest123/Guest123
    Can you help me in that please?
0
 
Ray PaseurCommented:
I can give a general idea about how one might design such an application.  First, you should read this article carefully.  It will show you how to do client authentication, including how to recognize that a client is "logged in" to your site.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_2391-PHP-login-logout-and-easy-access-control.html

PHP is used to access the request and data model, then generate the HTML, JavaScript and CSS that gets sent to the server.  As such, one PHP script can generate all of the parts of your web page, using PHP control structures to generate different components of the page for different clients, depending on whether they've "logged in" or not.  The single-script design will be simpler than trying to coordinate the work of four different scripts and will get you out of the problem of "Sorry, your browser does not handle frames!"
0
 
Ashraf HassaneinAuthor Commented:
Hi Slick thanks for your support, I am converting it now to div, thanks for your support, thanks for  DamjanDemsar and John for their help.
0
 
Ashraf HassaneinAuthor Commented:
Very supportive and helpfule remarks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.