我有一些HTML和Javascript代码,使用method = post将一个表单发送到一个动作=" www.randomaction.com/randomaction.php"。
现在我想通过将其发送到我的邮件(同一篇文章)确切地看到它如何将其发送到操作,但是我不想让网站打开用户邮件客户端来执行此操作,我希望它从我的Gmail帐户发送到我的其他Gmail帐户。
我的代码如下:
<form action="http://www.randomaction.com/shared/AddClient/index.php" class="form hod-hasharon" data-name="Email Form Hod Hasharon" data-redirect="http://www.kbanim.com/landing-pages/thank-you" id="wf-form-Email-Form-Hod-Hasharon-2" method="post" name="wf-form-Email-Form-Hod-Hasharon" redirect="http://www.kbanim.com/landing-pages/thank-you">
<div class="w-embed w-script">
<script type="text/javascript" language="JavaScript">
<!--
var MediaTitle= document.URL;
if(MediaTitle.includes("facebook"))
{
MediaTitle= "facebook";
}
if(MediaTitle.includes("googles"))
{
MediaTitle= "google search";
}
if(MediaTitle.includes("googlem"))
{
MediaTitle= "google media";
}
if(MediaTitle.includes("googler"))
{
MediaTitle= "google remraketing";
}
document.write('<input type=hidden data-name="MetaTitle" id="MetaTitle" name="MetaTitle" required="required" ');
document.write(' value="' + document.URL + '">');
document.write('<input type=hidden data-name="Password" id="Password" name="Password" required="required" value="jkq0105">');
document.write('<input type=hidden data-name="ProjectID" id="ProjectID" name="ProjectID" required="required" value="6661">');
//-->
</script>
</div>
<input class="_3 hod-hasharon text-field w-input" data-name="Fname" id="Fname" maxlength="256" name="Fname" placeholder="שם מלא:" required="required" type="text">
<input class="_2 hod-hasharon text-field w-input" data-name="Phone" id="Phone" maxlength="256" name="Phone" placeholder="טלפון:" required="required" type="text">
<input class="hod-hasharon text-field w-input" data-name="Email" id="Email" maxlength="256" name="Email" placeholder="מייל:" required="required" type="email">
<input class="submit-button w-button" data-wait="שולח..." type="submit" value=" שליחה >>">
</form>
有什么建议吗?
提前谢谢!
答案 0 :(得分:0)
POST方法不会向页面发送任何可见的内容。
您的POST信息将在PHP文件的PHP数组中提供:
$_POST
如果您想从表单中访问单个值:
$_POST['yourInputID']