can I set a target frame for a header in php
I have this code header("location:login_success.php"); The frame target code that I used in html doesn't seem to work, is there a counter part in php that you can define where the header("location:login_success.php"); will go? This is in relation to designing the logout. I'm having problems because I have 3 frames. Is there any solution besides removing the frames.
if($count==1){
// Register $myusername开发者_如何学Python, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword");
header("location:login_success.php");
}
PHP won't help you with frame navigation.
Either set targets in your HTML or JavaScript.
basic link:
<a href="http://www.google.com/" target="someframe">load stuff</a>
submit a form:
<form method="get" action="somepage.html" target="someframe">
any form content
</form>
Note: your frame (or iframe) MUST have a name attribute... not (just) an id attribute. (The id is fine, but the name is needed for targeting.
精彩评论