Skip to main content
Participant
October 9, 2012
Answered

php issue with IE, but works with Chrome & Safari

  • October 9, 2012
  • 2 replies
  • 1078 views

In Dreamweaver CS6 I created a html & a php file for an online employment application to be sent via email.  The html file views fine in Internet Explorer but when you select the button that runs the php it thinks for a minute then brings back application screen with nothing filled in. Both Chrome & Safari completes the action (submitting the application via email then displays the "successful" message). I have tried using the Adobe BrowserLab on both the HTML & PHP files.  No messages popped up that something is wrong. Any suggestions?

Files in question are posted to www.heartprinthomecare.com/application1.html & www.heartprinthomecare.com/app.php

Thank you in advance for any assistance you can provide

Additional Note: when the php runs in IE it does send a BLANK email.

This topic has been closed for replies.
Correct answer bregent

Since php is a server side scripting language, the problem must be with the client side code. Your form page has many validation errors:

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.heartprinthomecare.com%2Fapplication1.html

Most of this is probably due to your doctype not matching your markup. You should fix that.

But I think the problem is that you are using the formaction attribute in the submit button which is only supported in HTML5.  Rather than using two buttons, put the action in the form tag and give the visitor a radio button to choose location. Then have your script take appropriate action based on the radio button selected.

2 replies

David_Powers
Inspiring
October 9, 2012

It's because you're using the HTML5 formaction attribute in the submit buttons rather than the action attribute in the opening form tag. I'm not sure if IE 9 supports formaction, but it's certainly not supported by IE 8 and earlier.

Rather than use formaction, it's much safer for the foreseeable future to use the action attribute in the opening form tag.

You can use different scripts to process the form using PHP logic and the name of the button that's clicked.

<?php

if (isset($_POST['SDsubmit'])) {

    // process for South Dakota

    require('app.php');

} elseif (isset($_POST['NESubmit'])) {

    // process for Nebraska

    require('nebraska_app.php');

}

?>

Participating Frequently
October 9, 2012

>I'm not sure if IE 9 supports formaction

I don't believe it does.

>You can use different scripts to process the form using

>PHP logic and the name of the button that's clicked.

Even better than my radio button suggestion.

bregentCorrect answer
Participating Frequently
October 9, 2012

Since php is a server side scripting language, the problem must be with the client side code. Your form page has many validation errors:

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.heartprinthomecare.com%2Fapplication1.html

Most of this is probably due to your doctype not matching your markup. You should fix that.

But I think the problem is that you are using the formaction attribute in the submit button which is only supported in HTML5.  Rather than using two buttons, put the action in the form tag and give the visitor a radio button to choose location. Then have your script take appropriate action based on the radio button selected.

epjgs-uahAuthor
Participant
October 9, 2012

Ironically, I removed a lot of the /> thinking that was the problem. I'm fairly new at using this program. The application was taken from a Word file & converted through Dreamweaver. I will fix the markup issues. I appreciate your response

epjgs-uahAuthor
Participant
October 10, 2012

Thank you to both of you. The radio option and code information helped me to blend the old application html & php (which I didn't create) with the current layout & information. I like the code checker. I have a few more to fix right now but the application now works!! Thank you!!!