Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

submit php form from inside an <iframe>

3:21 am on Feb 6, 2009 (gmt 0)

New User

5+ Year Member

joined:Dec 21, 2008
posts: 19
votes: 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?


2:29 pm on Feb 11, 2009 (gmt 0)


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

joined:July 31, 2003
votes: 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?

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members