HTML CSS中的联系人表单,但我不创建PHP代码

HTML CSS中的联系人表单,但我不创建PHP代码,php,html,css,contact,contact-form,Php,Html,Css,Contact,Contact Form,我用html和css创建了联系人表单,现在是最难的部分。 因为这是我第一次使用php代码sapede,请告诉我如何创建代码,以便您可以发送包含表单上所有信息的邮件 对不起,我的英语不好,如果你不明白我的问题,请告诉我 HTML代码 <form id="contactform"> <div class="formcolumn"> <label for="name">Nome e Cognome</label> <input type="text

我用html和css创建了联系人表单,现在是最难的部分。 因为这是我第一次使用php代码sapede,请告诉我如何创建代码,以便您可以发送包含表单上所有信息的邮件

对不起,我的英语不好,如果你不明白我的问题,请告诉我

HTML代码

<form id="contactform">
<div class="formcolumn">
<label for="name">Nome e Cognome</label>
<input type="text" id="name" />
<label for="indirizzo">Indirizzo</label>
<input type="text" id="indirizzo" />
<ul>
<li>Consegna a Domicilio<input type="checkbox" id="domicilio" /></li>
</ul>
</div>
<div class="formcolumn">
<label for="telefono">Telefono</label>
<input type="text" id="telefono" />
<label for="email">E-mail</label>
<input type="email" id="email" />
<ul>
<li>Ritiro presso la macelleria<input type="checkbox" id="macelleria" /></li>
</ul>
</div>
<div class="formcolumn_2">
<label for="consegna">Indirizzo di consegna</label>
<input type="text" id="consegna" />
<label for="note">Note</label>
<input type="text" id="note" />
<label for="feedback">Ordine</label>
<textarea id="feedback"></textarea>
</div>
<div class="buttons">
<input class="button" value="INVIA" type="INVIA">
</div>
</form>

还有,你能告诉我,即使我给了短信上的text align:center INVIO按钮,它仍然在左边吗?

你需要这样的东西

<html><body> 

<form action= "post.php" method= "POST"> 

<p>Имя: </p><p> <input type= "text" name= "name"> </p> 

<p>E-mail: </p><p> <input type= "text" name= "email"></p> 

<p>Сообщение: </p><p> <textarea rows= "10" cols= "45" name= "message"></textarea></p> 

<input type= "submit" value= "Отправить"> 

</body></html> 

цц:

电子邮件:

Сббббб:

where action=“post.php”php文件是一个连接,因此您需要显式地编写此文件以发送信件,然后像示例中那样连接它。

只需复制并粘贴即可。希望这对您有所帮助!
just copy and paste..hope this will help you!

<?php
if(isset($_POST['subm']))
{

$name=$_POST['name'];   
$Indirizzo=$_POST['Indirizzo'];
$telefono=$_POST['telefono'];
$email=$_POST['email'];
$consegna=$_POST['consegna'];
$note=$_POST['note'];
$feedback=$_POST['feedback'];
$to = "somebody@example.com";
$subject = "Details";

$message = "
<html>
<head>
<title>Contact details</title>
</head>
<body>
<p>Your Details</p>
<table>
<tr>
<th>Name</th>
<th>Indirizzo</th>
<th>telefono</th>
<th>email</th>
<th>consegna</th>
<th>note</th>
<th>feedback</th>
</tr>
<tr>
<td>$name</td>
<td>$Indirizzo</td>
<td>$telefono</td>
<td>$email</td>
<td>$consegna</td>
<td>$note</td>
<td>$feedback</td>
</tr>
</table>
</body>
</html>
";

// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

// More headers
$headers .= 'From: somebody@example.com>' . "\r\n";
$headers .= 'Cc: somebody@example.com' . "\r\n";

mail($to,$subject,$message,$headers);

echo "Thank you for sending us feedback";
}
?>
<html>
<head>
</head>
<title>feedback form</title>
<style>

 <---your css code -->    

</style>
</head>
<body>


<form id="contactform" method="post">
<div class="formcolumn">
<label for="name">Nome e Cognome</label>
<input type="text" id="name" name="name" />
<label for="indirizzo">Indirizzo</label>
<input type="text" id="indirizzo" name="Indirizzo"  />
<ul>
<li>Consegna a Domicilio<input type="checkbox" id="domicilio" /></li>
</ul>
</div>
<div class="formcolumn">
<label for="telefono">Telefono</label>
<input type="text" id="telefono" name="telefono" />
<label for="email">E-mail</label>
<input type="email" id="email" name="email" />
<ul>
<li>Ritiro presso la macelleria<input type="checkbox" id="macelleria" /></li>
</ul>
</div>
<div class="formcolumn_2">
<label for="consegna">Indirizzo di consegna</label>
<input type="text" id="consegna" name="consegna"/>
<label for="note">Note</label>
<input type="text" id="note" name="note"/>
<label for="feedback">Ordine</label>
<textarea id="feedback" name="feedback"></textarea>
</div>
<div class="buttons">
<input class="button" value="INVIA" name="subm" type="submit">
</div>
</form>
</body>
</html>
反馈表 同源名词 地址
  • 住所
电传 电子邮件
  • 马塞莱里亚酒店
康塞格纳英迪里佐酒店 注 奥丁
您需要将
text align:center
添加到
#contactform input.按钮中,而不是添加到其父级-Quindi devo rifare il form usando il tag

Inlotre come faccio poi a creare il codice php perchèquesta l'unica cosa che non so fare因此我必须使用标记重新创建表单,然后如何创建php代码因为这是我唯一不能做的事情,而且类似的表单不会生成php代码,可以说表单处理程序是单独编写的!,php文件在客户端执行它在服务器端执行,这需要一个本地web服务器,如果你不写表单处理程序,难道你不认为互联网的广度可以100%正常运行,但不保证正常运行,那么你为什么要重复表单标签p?如果你是指我发送的代码部分,这个例子中的一个例子,使用p标签不一定
just copy and paste..hope this will help you!

<?php
if(isset($_POST['subm']))
{

$name=$_POST['name'];   
$Indirizzo=$_POST['Indirizzo'];
$telefono=$_POST['telefono'];
$email=$_POST['email'];
$consegna=$_POST['consegna'];
$note=$_POST['note'];
$feedback=$_POST['feedback'];
$to = "somebody@example.com";
$subject = "Details";

$message = "
<html>
<head>
<title>Contact details</title>
</head>
<body>
<p>Your Details</p>
<table>
<tr>
<th>Name</th>
<th>Indirizzo</th>
<th>telefono</th>
<th>email</th>
<th>consegna</th>
<th>note</th>
<th>feedback</th>
</tr>
<tr>
<td>$name</td>
<td>$Indirizzo</td>
<td>$telefono</td>
<td>$email</td>
<td>$consegna</td>
<td>$note</td>
<td>$feedback</td>
</tr>
</table>
</body>
</html>
";

// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

// More headers
$headers .= 'From: somebody@example.com>' . "\r\n";
$headers .= 'Cc: somebody@example.com' . "\r\n";

mail($to,$subject,$message,$headers);

echo "Thank you for sending us feedback";
}
?>
<html>
<head>
</head>
<title>feedback form</title>
<style>

 <---your css code -->    

</style>
</head>
<body>


<form id="contactform" method="post">
<div class="formcolumn">
<label for="name">Nome e Cognome</label>
<input type="text" id="name" name="name" />
<label for="indirizzo">Indirizzo</label>
<input type="text" id="indirizzo" name="Indirizzo"  />
<ul>
<li>Consegna a Domicilio<input type="checkbox" id="domicilio" /></li>
</ul>
</div>
<div class="formcolumn">
<label for="telefono">Telefono</label>
<input type="text" id="telefono" name="telefono" />
<label for="email">E-mail</label>
<input type="email" id="email" name="email" />
<ul>
<li>Ritiro presso la macelleria<input type="checkbox" id="macelleria" /></li>
</ul>
</div>
<div class="formcolumn_2">
<label for="consegna">Indirizzo di consegna</label>
<input type="text" id="consegna" name="consegna"/>
<label for="note">Note</label>
<input type="text" id="note" name="note"/>
<label for="feedback">Ordine</label>
<textarea id="feedback" name="feedback"></textarea>
</div>
<div class="buttons">
<input class="button" value="INVIA" name="subm" type="submit">
</div>
</form>
</body>
</html>