Why is submit button value not in $_POST w/ iframe as target
Posted: Fri Sep 07, 2007 9:47 pm
Why, if I submit a post form with an iframe as the target, does the value or existence of the submit button not get passed in array $_POST?
I'm working on a simple page to upload an image and I'm having it show a preview of the image before any changes are committed, so I target an iframe because I don't want the page to reload. But targeting an iframe in the form does not pass the submit button. The only difference between the output print_r($_POST, true) show below is if if remove target="hiddenFrame" ind the form tag.
Array
(
[title] => 3
[size] => f3
[type] => 3
[price] => 3
[new] => landscapes
)
Array
(
[new] => landscapes
[title] => 3
[size] => f3
[type] => 3
[price] => 3
[Submit] => 1
)
I don't really need to know the value of the submit button, I was just wondering why this is. This is the first time I've worked with PHP, so any help or clarification would be greatly appreciated. Thanks.
I'm working on a simple page to upload an image and I'm having it show a preview of the image before any changes are committed, so I target an iframe because I don't want the page to reload. But targeting an iframe in the form does not pass the submit button. The only difference between the output print_r($_POST, true) show below is if if remove target="hiddenFrame" ind the form tag.
Array
(
[title] => 3
[size] => f3
[type] => 3
[price] => 3
[new] => landscapes
)
Array
(
[new] => landscapes
[title] => 3
[size] => f3
[type] => 3
[price] => 3
[Submit] => 1
)
I don't really need to know the value of the submit button, I was just wondering why this is. This is the first time I've worked with PHP, so any help or clarification would be greatly appreciated. Thanks.