Contact form using PHP is not working in IE but works in FF.
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Contact form using PHP is not working in IE but works in FF.
Firstly hello everyone!
I was wondering if someone could help me with my php script handling form data sent from an HTML form. I am very new to using PHP and only have experience using HTML and CSS to build websites.
I have recently built a small website for a local company who wanted a custom contact form, so I used a free online php form generator and modified the script to accommodate / validate the new form fields. It has been uploaded today and works fine in FF and Safari, allowing the form data to be sent to the client as an email.
The problem is that Internet Explorer (have tested 6 and 8) doesn't like it. It just takes you to a the 'Internet Explorer cannot display this webpage' screen, with the php script location showing in the address bar. It does not show either the success.htm or error.htm pages that the script is set to point to.
I know I've probably messed up the script by modifying it, but I can't see what I've done wrong. The php form is in the same directory as the contact form, respectively named 'contact.htm' and 'feedback.htm'.
If someone who knows more about php could explain a simple fix to the problem I'd be most grateful! I didn't want the php form to be anything incredible, just to validate there was information in the required fields and pass that information through via email.
Here is the php script, followed by the html form. I haven't included the .css for the page, but i've tried removing the classes and it isn't causing the problem.
I was wondering if someone could help me with my php script handling form data sent from an HTML form. I am very new to using PHP and only have experience using HTML and CSS to build websites.
I have recently built a small website for a local company who wanted a custom contact form, so I used a free online php form generator and modified the script to accommodate / validate the new form fields. It has been uploaded today and works fine in FF and Safari, allowing the form data to be sent to the client as an email.
The problem is that Internet Explorer (have tested 6 and 8) doesn't like it. It just takes you to a the 'Internet Explorer cannot display this webpage' screen, with the php script location showing in the address bar. It does not show either the success.htm or error.htm pages that the script is set to point to.
I know I've probably messed up the script by modifying it, but I can't see what I've done wrong. The php form is in the same directory as the contact form, respectively named 'contact.htm' and 'feedback.htm'.
If someone who knows more about php could explain a simple fix to the problem I'd be most grateful! I didn't want the php form to be anything incredible, just to validate there was information in the required fields and pass that information through via email.
Here is the php script, followed by the html form. I haven't included the .css for the page, but i've tried removing the classes and it isn't causing the problem.
dealt with a similar problem, and may help you out. IE isn't a very good browser, and if you spend any time coding pages, you're likely to run into this again. Everything else will work fine...except IE. And it's so widely known, there are even ways to code your pages, so they'll work in IE, too.
And I realize you're just learning PHP, but I'd strongly suggest NOT using form-generators. They're like FrontPage used to be...you got something that would work, but it's rarely as good as what you'd get if you hand-coded it. Most of the PHP forms I do, wind up as two-part forms...one page for the 'fill-in-the-blanks' part, where I do my data validation, checking, etc., and another form that processes that data, and performs the action.
Hope this helps. If not, shoot me an email, and I can send you a simple working form set for you to play with.
I'm surprised that it says that the page cannot be found. PHP is a server side scripting language which generates HTML for the browser. I can understand if the page doesn't display properly in IE, but the fact that it works in FF shows that the PHP script is able to atleast generate HTML.
This may sound silly, but can you access some other website? (say Google) My guess is some settings of IE are incorrect.
Thanks for the response. I was able to surf around other websites no problem so it didn't appear to be incorrect settings, worth checking tho.
The problem has been solved it turns out the php script was sending the data through, it was just IE wasn't displaying the success or error page. Turns out i had 'http:///www.etc etc', too many slashes! In my haste in modifying the code, i must have not deleted a slash and failed to see it. Doh!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.