okrobie Posted January 12, 2010 Share Posted January 12, 2010 I have a form in the "menu" side of a frames page. and the form action set to SELF. I want the form result to come back to the menu window in frames . Instead it comes back to the default window. Is there a way to have it perform the way I want? I hope I made this clear enough. Thanks. $self = $_SERVER['PHP_SELF']; $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $user_email = $_POST['user_email']; ?> <form action="<?php echo( $self ); ?>" font ="arial" color="white" method="post"> First Name: <br><input type="text" name="first_name" size="8"><br> Last Name: <br><input type="text" name="last_name" size="8"><br> Email: <br><input type="text" name="user_email" size="8"><br><br> <input type="submit" value="Submit"> </form> Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 12, 2010 Share Posted January 12, 2010 I absolutely detest frames. I'm not going to test this, but I'm pretty sure you can solve your problem by simply adding a target parameter to the form tag and setting the value to the appropriate pane. However, I forget how you name your frames. Quote Link to comment Share on other sites More sharing options...
okrobie Posted January 12, 2010 Author Share Posted January 12, 2010 Thank you mjdamato, I tested that. <form action="menu.php target=_self " method="post"> but got the same result. Anything else come to mind. PS: the pane on the left is called menu and the main pane is default. Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 12, 2010 Share Posted January 12, 2010 try target="menu" FYI: This is just one example of why using frames is not generally used. If you are using PHP then you have the ability to manage menus and such independantly from the content. So why use frames? Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 12, 2010 Share Posted January 12, 2010 Hmm... I just tested and a framed form always POSTed in the frame it was called from. I could only get the form to POST to another frame or the entire window by specifically assigning a value for the other window or page in the form target. Not sure why you are getting different results. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.