Jump to content

PHP Form results in raw HTML to be displayed


CaptMidnight

Recommended Posts

I have a generic question and have searched for something similar to this here and elsewhere.  I'm sure this is a very very simple problem, but I'm trying to work through someone elses code.

I have a script that validates a form.. no biggie.  If there exists an error in the form, then the page is redisplayed with an error note at the top with the error that is encountered (such as a missing or invalid e-mail address, etc.)  This works this way in IE, Opera and Firefox with no problems.

If the form IS VALID, the form is re-displayed with a confirmation note at the top confirming the successful insertion in the database, etc....But here's the kicker... It works only in IE.  Firefox and Opera show the raw HTML!

I spent most of all of today trying to debug this problem.

Any pointers or suggestions?

???
Here's the code.  I found another example in a smaller script.  This one has no input changes that you can modify other than the "years".  Everything else is pre-populated content.  The only error content would come back from PayPal, so since I'm in their sandbox and using one of their credit card numbers, it's always valid.

Since the result is valid, it then displays the raw HTML code to non-IE browsers.  It DOES perform the renewal action and does the update in the database.

{code deleted -- problem resolved}

Ok, I figured it out.... Inside the script was a call to a PayPal function which called request_base.php (standard paypal include).  In there, was specified: header('Content-Type: text/plain');  I changed that to "html" and all is good.

Isn't it funny how IE will just make-it-work?  Hideous.
Thanks for all who looked at this post.

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.