2014-02-12 3 views
0

페이지에 양식이 있고 제출할 때 PHP 입력 페이지로 전송되어 이메일을 보내드립니다. 이 양식은 크롬 버전 32.0.1700.107의 m 및 IE10에서 제대로 작동하지만, 파이어 폭스 26.0에 그것을 형성하는 사용자 후 PHP 페이지에 다음과 같은 표시 전송 : 여기에 PHP 폼이 FireFox 26.0에 제대로 제출되지 않았습니다.

Thank you, $fname! we will get back to you. 

"; print" 

Today's date is $date. 
"; $to = "[email protected]"; $subject = "Financing for $fname $lname"; $body = " Date: $date \n\n Note: If any fields have been left blank it means the user did not input anything. \n\n First name: $fname \n Last name: $lname \n Company: $cname \n Email: $email \n Phone: $phone \n Fax: $fax \n Address: $address \n City: $city \n Province: $province \n Postal Code: $postal \n Equipment Type: $et \n Amount: $amount\n\n"; $headers = "From: [email protected]"; mail($to, $subject, $body, $headers); ?> 

가 크롬에 표시되는 PHP입니다 웹 페이지 : 여기
<?php 

$fname= $_POST['fname']; 
$lname= $_POST['lname']; 
$cname= $_POST['cname']; 
$email= $_POST['email']; 
$phone= $_POST['phone']; 
$fax= $_POST['fax']; 
$address= $_POST['address']; 
$city= $_POST['city']; 
$province= $_POST['province']; 
$postal= $_POST['postal']; 
$et= $_POST['et']; 
$amount= $_POST['amount']; 

$date = gmdate("M d Y"); 

print"<p>Thank you, $fname! we will get back to you.</p>"; 
print"<p>Today's date is $date.</p>"; 

$to = "------"; 
$subject = "Financing for $fname $lname"; 
$body = " Date: $date \n\n Note: If any fields have been left blank it means the user did not input anything. \n\n First name: $fname \n Last name: $lname \n Company: $cname \n Email: $email \n Phone: $phone \n Fax: $fax \n Address: $address \n City: $city \n Province: $province \n Postal Code: $postal \n Equipment Type: $et \n Amount: $amount\n\n"; 
$headers = "From: [email protected]"; 
mail($to, $subject, $body, $headers); 
?> 

는 index.html 페이지에있는 양식 코드 : 여기

Thank you, ! we will get back to you. 

Today's date is Feb 12 2014. 

는 PHP 페이지 내 PHP 코드

<?php date_default_timezone_set('America/Edmonton'); ?> 
<!doctype html> 
<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]--> 
<!--[if IE 7]> <html class="ie7 oldie"> <![endif]--> 
<!--[if IE 8]> <html class="ie8 oldie"> <![endif]--> 
<!--[if gt IE 8]><!--> 
<html class=""> 
<!--<![endif]--> 
<head> 
<meta name="author" content="Kelsey Nealon([email protected]), Contract Web Developer" /> 
<meta name="description" content="GBM Trailer Service Ltd. Calgary-based, proudly serving the tanker and bulk goods transportation industry for over 25 years." /> 
<meta name="keywords" content="Tanker, Barrel, Parts, Betts, Camloc, Scully, Lubecore, Dixon, GBM, Flotech" /> 
<title>GBM Trailer Service Ltd. ::: Financing</title> 
<link rel="stylesheet" type="text/css" media="screen" href="css/mobilemenu.css"/> 
<meta charset="utf-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<link href="boilerplate.css" rel="stylesheet" type="text/css"> 
<link href="responsive.css" rel="stylesheet" type="text/css"> 
<link href="jquery.custom-scrollbar.css" rel="stylesheet" type="text/css"> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
<script src="jquery.custom-scrollbar.js"></script> 
<!-- 
To learn more about the conditional comments around the html tags at the top of the file: 
paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ 

Do the following if you're using your customized build of modernizr (http://www.modernizr.com/): 
* insert the link to your js here 
* remove the link below to the html5shiv 
* add the "no-js" class to the html tags at the top 
* you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build 
--> 
<!--[if lt IE 9]> 
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 
<![endif]--> 
<!-- jQuery library (served from Google) --> 

<script> 
     $(document).ready(function(){ 
      $(".nav-button").click(function() { 
      $(".nav-button,.primary-nav").toggleClass("open"); 
      });  
     }); 
    </script> 

<script src="respond.min.js"></script> 

<script type="text/javascript"> 
function validateForm() 
{ 
var x=document.forms["myForm"]["fname"].value; 
if (x==null || x=="") 
    { 
    alert("First name must be filled out"); 
    return false; 
    } 

var x=document.forms["myForm"]["lname"].value; 
if (x==null || x=="") 
    { 
    alert("Last name must be filled out"); 
    return false; 
    } 

var x=document.forms["myForm"]["phone"].value; 
if (x==null || x=="") 
    { 
    alert("Phone number must be filled out"); 
    return false; 
    } 

var x=document.forms["myForm"]["city"].value; 
if (x==null || x=="") 
    { 
    alert("City/Town must be filled out"); 
    return false; 
    } 

var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;  
if(document.forms["myForm"]["email"].value.match(mailformat)) 
{ 
} 
else 
{ 
alert("You have entered an invalid email address"); 
document.myForm.email.focus(); 
return false; 
} 

    var phoneno = /^\d{10}$/; 
    if(document.forms["myForm"]["phone"].value.match(phoneno)) 
    { 
    } 
    else 
    { 
    alert("Not a valid Phone Number"); 
    return false; 
    } 

} 

function ValidateEmail(inputText) 
{ 
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;  
if(inputText.value.match(mailformat)) 
{ 
document.myForm.email.focus(); 
} 
else 
{ 
alert("You have entered an invalid email address"); 
document.myForm.email.focus(); 
return false; 
} 
} 
</script> 

<script> 
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 

    ga('create', 'UA-45342007-3', 'gbmtrailer.ca'); 
    ga('send', 'pageview'); 

</script> 
</head> 
<body bgcolor="#102540"> 
<div class="gridContainer clearfix"> 
    <div id="div1" class="fluid"> 

<div id="wrapper2"><a href="../index.html"><img src="images/bannerpics.jpg" alt="G.B.M. Trailer Service LTD. Logo" title="G.B.M. Trailer Service LTD. Logo" id="logo"/></a></div> 
    <div id="wrapper3"><button class="nav-button">Toggle Navigation</button></div> 

<div id="navcontain"> 
      <ul class="primary-nav"> 
       <li><a href="../index.html">Home</a> 
       </li> 
       <li><a href="../completions/index.html">Completions</a> 
       </li> 
       <li><a href="../insuranceclaims/index.html">Insurance Claims</a> 
       </li> 
       <li><a href="../sales/index.html">Sales</a> 
       </li> 
       <li><a href="../service/index.html">Service</a> 
       </li> 
       <li><a href="../truckmounts/index.html">Truck Mounts</a> 
       </li> 
       <li><a href="../certificationsandinspections/index.html">Certifications & Inspections</a> 
       </li> 
       <li><a href="../contactus/index.html">Contact Us</a> 
       </li> 
       <li><a href="../parts/index.html">Parts</a> 
       </li> 
       <li><a href="../repairsandmaintenance/index.html">Repairs & Maintenance</a> 
       </li> 
       <li><a href="../warranty/index.html">Warranty</a> 
       </li> 
       <li><a href="../careers/index.html">Careers</a> 
       </li> 
       <li><a href="#">Parts Catalogue</a> 
       </li> 
       <li><a href="../modifications/index.html">Modifications</a> 
       </li> 
       <li><a href="../steambays/index.html">Steam Bays</a> 
       </li> 
       <li><a href="../financing/index.html">Financing</a> 
       </li> 
      </ul> 
      </div> 

    <div id="wrapper"> 
    <img src="images/desktopgreybackground2.jpg" id="background4"> 
    <img src="images/desktopgreybackground.jpg" id="background3"> 
    <img id="background2" src="images/background6.jpg"/> 
    <div id="cover"></div> 

    <div id="mainnavdesktop"> 
     <a href="../index.html"><img id="logo2" src="images/gbmlogo.jpg" alt="G.B.M. Trailer Service LTD. Logo" title="G.B.M. Trailer Service LTD. Logo"/></a> 
     <a href="../sales/index.html"><img src="images/sales.jpg" alt="sales" title="Sales" id="sales"></a><a href="../completions/index.html"><img src="images/completions.jpg" alt="completions" title="Completions" id="completions"/></a><a href="../insuranceclaims/index.html"><img src="images/insuranceclaims.jpg" alt="insurance claims" title="Insurance Claims" id="insuranceclaims"/></a><a href="../index.html"><img src="images/home.jpg" alt="home" title="Home" id="home"/></a> 
     <a href="../service/index.html"><img src="images/service.jpg" alt="service" title="Service" id="service"/></a><a href="../truckmounts/index.html"><img src="images/truckmounts.jpg" alt="truck mounts" title="Truck Mounts" id="truckmounts"/></a><a href="../certificationsandinspections/index.html"><img src="images/certificationsandinspections.jpg" alt="certifications and inspections" title="Certifications and Inspections" id="certificationsandinspections"/></a><a href="../contactus/index.html"><img src="images/contactus.jpg" alt="contact us" title="Contact Us" id="contactus"/></a> 
     <a href="../parts/index.html"><img src="images/parts.jpg" alt="parts" title="Parts" id="parts"/></a><a href="../repairsandmaintenance/index.html"><img src="images/repairsandmaintenance.jpg" alt="repairs and maintenance" title="Repairs and Maintenance" id="repairsandmaintenance"/></a><a href="../warranty/index.html"><img src="images/warranty.jpg" alt="warranty" title="Warranty" id="warranty"/></a><a href="../careers/index.html"><img src="images/careers.jpg" alt="careers" title="Careers" id="careers"/></a> 
     <img src="images/partscatalogue.jpg" alt="parts catalogue" title="Parts Catalogue" id="partscatalogue"/><a href="../modifications/index.html"><img src="images/modifications.jpg" alt="modifications" title="Modifications" id="modifications"/></a><a href="../steambays/index.html"><img src="images/steambays.jpg" alt="steam bays" title="Steam Bays" id="steambays"/></a><a href="../financing/index.html"><img src="images/financing.jpg" alt="financing" title="Financing" id="financing"/></a> 
    </div> 

<img src="images/gbmtrailerservice_trailer.png" alt="G.B.M. Trailer Service LTD. Trailer Graphic" id="trailer23"> 

<div id="description"> 
    <h1><strong>G.B.M. FINANCIAL</strong></h1> 
    <p class="box1" style="text-align:left;">Offering a full variety of financial services for all heavy equipment purchases whether you found it at G.B.M. or somewhere else. We will guide you through the application and approval process.</p><p class="box2">Offering a full variety of financial services for all heavy equipment purchases whether you found it at G.B.M. or somewhere else. We will guide you through the application and approval process.</p><img src="images/heidisawatzkygbm.png" alt="Heidi Sawatzky" title="Controller" id="heidi"><img src="images/robdewargbm.png" alt="Rob Dewar" title="General Manager" id="rob"><p id="heidiemail" style="text-align:center;">Heidi Sawatzky<br /><a href="mailto:[email protected]?subject=Web%20Finance%20Information">[email protected]</a></p><p id="robemail" style="text-align:center">Rob Dewar<br /><a href="mailto:[email protected]?subject=Web%20Finance%20Information">[email protected]</a> 
    <br /> 
    <p>&nbsp;</p> 
    <p class="box3" style="text-align:left;">Heidi or Rob will help you secure your purchase. They will ensure that you are looked after and that you are suited with the right financial package. Contact them by phone 403 279 9717 or by email with any questions you may have.</p> 
</div> 

<div id="contenttext"> 
<form name="myForm" action="financing.php" onsubmit="return validateForm();" method="post"><H2 style="text-align:center;" id="conhead">Contact Information</h2><br /><br /> 
<p> 
First name * <input class="inputfield" type="text" name="fname"><br /><br /> 
Last name * <input class="inputfield" type="text" name="lname"><br /><br /> 
Company <input class="inputfield" type="text" name="cname"><br /><br /> 
Email * <input class="inputfield" type="text" name="email"><br /><br /> 
Phone * <input class="inputfield" type="text" name="phone"><br /><br /> 
Fax <input class="inputfield" type="text" name="fax"><br /><br /> 
Address <input class="inputfield" type="text" name="address"><br /><br /> 
City/Town * <input class="inputfield" type="text" name="city"><br /><br /> 
Province <input class="inputfield" type="text" name="province"><br /><br /> 
Postal Code <input class="inputfield" type="text" name="postal"><br /><br /> 
Equipment Type <input class="inputfield" type="text" name="et"><br /><br /> 
Amount <input class="inputfield" type="text" name="amount"><br /><br /> 
<input type="submit" value="Send" id="submitbutton"></p></form> 
<p class="ppolicy"><strong>Privacy Policy:</strong> All information gathered in this form will be kept strictly confidential.</p><p class="required"> 
*Required</p><p id="tools">TOOLS: <a style="color:white;" href="loancalculator.html">LOAN CALCULATOR</a>, <a style="color:white;" href="creditapplication.docx" title="Basic credit application word document" target="_blank">CREDIT APPLICATION</a></p><p id="tools1"><br />TOOLS: <br /><br /><br /><br /><br /><a style="color:white;" href="loancalculator.html" title="Loan Calculator">LOAN CALCULATOR</a><br /><br /><br /><br /><br /> <a style="color:white;" href="creditapplication.docx" title="Basic credit application word document" target="_blank">CREDIT APPLICATION</a></p> 
</div> 
<div id="bottomquote"> 
    Your Certified Tanker Trailer Specialist 
</div> 
<div id="bottomcontactinfo"> 
    <em>Phone <a style="color:white; text-decoration:none;" href="tel:1-4032799717">403 279 9717</a> or <a style="color:white; text-decoration:none;" href="tel:1-888-426-9717">1 888 426 9717</a> 9300 Endeavor Dr. SE, Calgary Alberta, T3S 0A1<br /><a style="color:white; text-decoration:none;" href="mailto:[email protected]">[email protected]</a> 
</div> 

<img src="images/visamastercardlogos.gif" id="visamastercardlogos" alt="Visa and Mastercard Logo" title="Visa and Mastercard Logo"> 

<a href="#"><img id="mycart" src="images/mycart.gif" alt="My Cart" title="My Cart"></a> 
</div> 
</div> 
</div> 
</div> 
<script> 
var myWindow; 

function openWin() 
{ 
myWindow = window.open("","", "width=300,height=500"); 
} 
</script> 
<script> 
<!-- 
var autoSizeText; 
autoSizeText = function() { 
    var el, elements, _i, _len, _results; 
    elements = $('.resize'); 
    console.log(elements); 
    if (elements.length < 0) { 
    return; 
    } 
    _results = []; 
    for (_i = 0, _len = elements.length; _i < _len; _i++) { 
    el = elements[_i]; 
    _results.push((function(el) { 
     var resizeText, _results1; 
     resizeText = function() { 
     var elNewFontSize; 
     elNewFontSize = (parseInt($(el).css('font-size').slice(0, -2)) - 1) + 'px'; 
     return $(el).css('font-size', elNewFontSize); 
     }; 
     _results1 = []; 
     while (el.scrollHeight > el.offsetHeight) { 
     _results1.push(resizeText()); 
     } 
     return _results1; 
    })(el)); 
    } 
    return _results; 
}; 

autoSizeText(); // here is where we call the function. 
//--> 
</script> 
</body> 
</html> 

의견을 보내주십시오. 모든 도움을 주실 수 있습니다.

+0

그래서 PHP 코드를 인쇄하고 있습니까? – Quixrick

+2

PHP는 서버 측에서만 실행되며, 브라우저는 영향을 미치지 않아야합니다. 코드의 클라이언트 측 부분은 무엇입니까? – FabioCosta

+0

'.php' 파일을 가지고 계십니까? – MahanGM

답변

1

Javascript로 게시하는 경우 Javascript를 확인하십시오. 또한 작동하지 않는 브라우저의 캐시를 지우십시오. 해당 브라우저를 다시 시작하십시오.

+0

고마워, 그것을 작동, 브라우저를 다시 시작! – Kelsey

+0

유용하게 설정하려면 위에 화살표를 표시하십시오. – user2754532

관련 문제