Jump to content

"form action" question


okrobie

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/188205-form-action-question/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/188205-form-action-question/#findComment-993654
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.