homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

submit php form from inside an <iframe>

5+ Year Member

Msg#: 3843465 posted 3:21 am on Feb 6, 2009 (gmt 0)

I have 4 sites that use the same php form code.

I got tired of maintaining 4 versions so I just put a link on 3 of the sites contact forms to one site.

I have been trying to instead get the other 3 sites to use the same form processing from inside an iframe. I validate $_SERVER['HTTP_REFERER'], though I know it can be spoofed, and have lots of spam checks against hijacking, header injection etc. so I am not too concerned here.

It works sometimes. Other times, when I submit the form, all the values in $_POST just disappear.
"Notice: Undefined variable: _POST in ........"

I am so close to having this work the way I would like except that half the time the $_POST array goes away.

Does anyone have any suggestions as to how I could fix this?




WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3843465 posted 2:29 pm on Feb 11, 2009 (gmt 0)

Not really. It sounds like hit and miss going on so it could be your logic. Are there more than one <form> on the page? And if so, do they all use the POST method?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved