моя почта PHP отправляет мне почту и вчера работает на 100%, но сегодня она отправляется, но каждое поле отправляется как номер один. Пример раскладка:PHP Отправка почты, но неверно
Hi my name is, $name. I would like to rent an apartment from, $apartment. My VEI Bank account number is, $account. Will you also check to see if our firm is purchasing from your commercial for the 10% discount? I work at, $cname. Please contact me back via email, $email.
Тем не менее, электронная почта выглядит следующим образом:
Hi my name is, 1. I would like to rent an apartment from, 1. My VEI Bank account number is, 1. Will you also check to see if our firm is purchasing from your commercial for the 10% discount? I work at, 1. Please contact me back via email, 1
, если вы хотите взглянуть на код страницы является synergy.x10host.com/business.php
благодарим заранее!
Редактировать
<?php
$to = '[email protected]';
$subject = 'Commercial Purchase!';
$cname = isset($_POST['cname']);
$cemail = isset($_POST['cemail']);
$bank = isset($_POST['bank']);
$ceo = isset($_POST['ceo']);
$sqft = isset($_POST['sqft']);
$message = <<<EMAIL
Hello, my name is, $ceo, and I am the CEO of $cname.
We would like to purchase $sqft sq ft of commercial from you for a total of $$sqft.
Our Firm bank account number is, $bank.
Thanks in advance and please contact us back at $cemail.
EMAIL;
$header = "From: $cemail";
if($_POST){
if($cname == '' || $cemail == '' || $bank == '' || $ceo == '' || $sqft == ''){
$feedback = 'Please fill out all of the fields.';
}else{
mail ($to, $subject, $message, $header);
$feedback = 'Thank you for purchasing a apartment through us!';
}
}
?>
<!DOCTYPE html>
<html>
<!--CSS Style and Title-->
\t <head>
\t \t <title>Synergy | Home</title>
\t \t <link rel="stylesheet" type="text/css" href="extra/style-bus.css">
\t \t <link rel="shortcut icon" href="extra/images/synergy.png"
\t </head>
\t <body>
\t \t <!--<div id="view-cart">
\t \t \t <a href="https://portal.veinternational.org/buybuttons/us06303/cart/">View Cart</a>
\t \t </div>-->
\t \t <div id="logonav">
\t \t \t <a href="index.html"><img src="extra/images/synergy.png" width="40px"></a>
\t \t </div>
\t \t <nav>
\t \t \t <a href="index.html">Home</a>
\t \t \t <a href="services.html">Services</a>
\t \t \t <a href="contact.php">Contact Us</a>
\t \t \t <a href="#aboutus">About Us</a>
\t \t </nav>
<!--Body of Page-->
<div id="bus-head">
\t <p align="center"><font size="9">BUSINESS</font></p>
</div>
<div id="bus-com">
\t <p id="feedback"><?php echo $feedback; ?></p>
\t \t <form action="?" method="post">
\t \t \t <ul>
\t \t \t \t <li>
\t \t \t \t \t <label for="cname">Company Name: </label>
\t \t \t \t \t <input type="text" id="cname" name="cname" required />
\t \t \t \t </li>
\t \t \t \t <li>
\t \t \t \t \t <label for="cemail">Company Email: </label>
\t \t \t \t \t <input type="text" name="cemail" id="cemail" required />
\t \t \t \t </li>
\t \t \t \t <li>
\t \t \t \t \t <label for="bank">Firm Bank Number: </label>
\t \t \t \t \t <input type="text" name="bank" id="bank" required />
\t \t \t \t </li>
\t \t \t \t <li>
\t \t \t \t \t <label for="ceo">CEO Name: </label>
\t \t \t \t \t <input type="text" name="ceo" id="ceo" required />
\t \t \t \t </li>
\t \t \t \t <li>
\t \t \t \t \t <input type="text" name="sqft" id="sqft" required />
\t \t \t \t \t <label for="sqft">Sq ft x $1.00 per Sq ft</label>
\t \t \t \t </li>
\t \t \t \t <li>
\t \t \t \t \t <input type="submit" value="Submit" />
\t \t \t \t </li>
\t \t \t </ul>
\t </form> \t
</div>
<!--Footer/Extra Nav/Copyright-->
\t <footer>
\t \t <p align="center">
\t \t \t <small><a href="index.html">Home</a> | <a href="contact.php">Contact Us</a> | <a href="services.html">Services</a> | <a href="#">About Us</a><br/>This is an official <font color="grey"><a href="https://veinternational.org/">Virtual Enterprises International</a></font> firm website and is for educational purposes only. || 2015-2016 | Synergy, Inc.</small>
\t \t </p>
\t </footer>
\t </body>
</html>
URL, который вы предоставили для кода, не найден. Не могли бы вы просто поставить код на свой вопрос здесь? –
Да, я только что заметил, я добавил весь код, мой плохой – Matt