添加到URL但未从html调用的PHP文件名
当使用html表单调用php将包含表单中详细信息的电子邮件发送到php中指定的电子邮件地址时。php文件名添加到URL中,但不发送电子邮件,页面显示为空白 该网站使用PHP7.3托管在my.ionos.co.uk(1和1)上添加到URL但未从html调用的PHP文件名,php,html,Php,Html,当使用html表单调用php将包含表单中详细信息的电子邮件发送到php中指定的电子邮件地址时。php文件名添加到URL中,但不发送电子邮件,页面显示为空白 该网站使用PHP7.3托管在my.ionos.co.uk(1和1)上 <form method="post" action="contact-form.php"> <input class="contact" type="text" name="Name" placeholder="Name"> <
<form method="post" action="contact-form.php">
<input class="contact" type="text" name="Name" placeholder="Name">
<input class="contact" type="text" name="Email" placeholder="Your Email Address">
<input class="contact" type="text" name="Subject" placeholder="Subject">
<textarea class="contact" name="Message" rows="10" placeholder="Message"></textarea>
<input class="contact-submit" type="submit" value="Send Message">
</form>
如果有人能帮忙,我将不胜感激,提前谢谢 尝试更改:
if(isset($_POST['submit'])) {
与
签出代码时,似乎没有名为
submit
的输入。因此,您永远不会在if
案例中输入。在contact form.php
中尝试添加var\u dump($\u POST)代码><代码>$\u POST
var可以吗?谢谢!我把名字=“提交”的形式,如果你解决你的问题,考虑接受答案,谢谢!
if(isset($_POST['submit'])) {
if(isset($_POST['Email'])) { //or another field in your form. If you want you can also add in your submit button: name="submit"