Hi there,
I am having problems with an HTML form in a php script that is inside a frame. When the form is posted I want it to open within the frame but it always opens a new window.
here is the form script:
echo $name; echo "<form method=post action=".$_SERVER['PHP_SELF'].">\n"; echo "<select name=source>\n"; foreach($array as $key=>$val){ $sel = ($val == $source)? " SELECTED " : ""; echo "<option $sel value=$val>$key\n"; } echo "</select>\n"; echo "<input type=submit name=go value=Go>\n"; echo "</form>\n";
It is for an RSS feed.
Thanks in advance.
Try using the value '_self' in the target attribute of the form ...
echo "<form method=post action=".$SERVER['PHP_SELF']." target="self">\n";
Paul 🙂
make sure you give the frame a name
<frame name="bleh">
and add target="bleh" to the form tag
<form action="POST" target="bleh">
Im pretty sure you can just do that
do what he said, its a better solution than mine 😛
Thanks for your help guys. tried these but they just blow the whole page and theres nothing in the frame but white background. Is there something i could substitute for action=".$_SERVER['PHP_SELF']." maybe?
thanks again