使用Amp模板提交表单不起作用,我无法使用php .Simply从amp-form发布数据未执行任何操作。如何修复它?我的网页:http://samiakhalil.com/theinfotime/amp/register1.php
<?php
if (isset($_POST['register'])) {
$name = $_POST['name'];
$email = $_POST['email'];
echo $name;
}
?>
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<form method="post"
action-xhr="https://ampbyexample.com/components/amp-form/submit-form-input-text-xhr"
target="_top">
<input type="text" class="data-input" name="name" placeholder="Name" required>
<input type="email" class="data-input" name="email" placeholder="Email" required>
<input type="submit" value="Register" name="register" class="button button-primary">
</form>发布于 2017-02-19 09:52:38
添加
<input type="hidden" name="register" value="a">按钮名称为空,我不知道
https://stackoverflow.com/questions/41844175
复制相似问题