안녕하세요, 저는 PHP를 조금 배우기 시작했으며 완성 된 양식의 정보를 전자 메일로 보낼 수 있는지 궁금합니다. 나는 아래에 나열된 코드를 가지고 있지만, 그것이 옳지 않다는 것을 안다. 어떤 도움도 감사 할 것이다!이메일로 완성 된 양식 정보 보내기
PHP :
<?php
$email = $_REQUEST['clientEmail'] ;
$subject = "New Order";
$name = $_REQUEST['clientName'] ;
$articleAmount = $_REQUEST['articleNum'];
$wordAmount = $_REQUEST['wordNum'];
$topic = $_REQUEST['topic'];
$info = $_REQUEST['addInfo'];
mail("[email protected]", $subject,
"Name:" . $name . "<br/>" . "Amount of Articles:" . $articleAmount . "<br/>" . "Amount of Words:" . $wordAmount . "<br/>" . "Topic:" . $topic . "<br/>" . "Additional Information:" . $info, "From:" . $email);
echo "Thank you for ordering!";
?>
HTML :
<form action="order.php">
<fieldset id="client" >
<legend>Client Information</legend>
<label for="clientName">Name:</label><input type="text" name="clientName" id="clientName" tabindex="1"/>
<label for="clientEmail">Email:</label><input type="email" name="clientEmail" id="clientEmail" tabindex="2"/>
</fieldset>
<fieldset id="order">
<legend>Order Information</legend>
<label for="articleNum">Number of Articles</label><input type="text" name="articleNum" id="articleNum" tabindex="3"/>
<label for="wordNum">Words per Article</label><input type="text" name="wordNum" id="wordNum" tabindex="4"/>
<label for="topic">Topics</label><input type="text" name="topic" id="topic" tabindex="5"/>
<label for="addInfo">Additional Info</label><input type="text" name="addInfo" id="addInfo" tabindex="6"/>
</fieldset>
<fieldset>
<button type="submit">Submit!</button>
</fieldset>
</form>
...? 질문이 뭐야? –
당신은 실제로 문제가 무엇인지 말하지 않았습니다 - 그것이 옳지 않다는 것을 어떻게 아십니까? –