Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/270.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
html提交按钮未处理action.php_Php_Html_Button_Action - Fatal编程技术网

html提交按钮未处理action.php

html提交按钮未处理action.php,php,html,button,action,Php,Html,Button,Action,我试图以html形式调用php文件,如代码所示,但发送按钮不起作用,有什么想法吗 <form id="contact-form" method="post" action="form_send.php"> <fieldset> <label class="name"> <input type="text" value="Your Name" onF

我试图以html形式调用php文件,如代码所示,但发送按钮不起作用,有什么想法吗

<form id="contact-form" method="post" action="form_send.php">
                <fieldset>
                  <label class="name">
                    <input type="text" value="Your Name" onFocus="if(this.value=='Your Name'){this.value=''}" onBlur="if(this.value==''){this.value='Your Name'}">
                  </label>
                  <label class="phone">
                    <input type="text" value="Telephone" onFocus="if(this.value=='Telephone'){this.value=''}" onBlur="if(this.value==''){this.value='Telephone'}">
                  </label>
                  <label class="email">
                    <input type="email" value="Email" onFocus="if(this.value=='Email'){this.value=''}" onBlur="if(this.value==''){this.value='Email'}">
                  </label>
                  <label class="message">
                    <textarea onFocus="if(this.value=='Message'){this.value=''}" onBlur="if(this.value==''){this.value='Message'}">Message</textarea>
                  </label>
                  <div class="btns"> <a class="button" onclick="clearFunction()" >Clear</a> <a class="button" type="submit" name="submit" value="Send Form" >Send</a> </div>
                </fieldset>
              </form>

消息
清除发送
您正在使用
标记提交表单


Send
替换为

您没有在表单中命名任何输入

<input **name='name'** value='Your name'>
<input **name='phone'** value='Phone'>
等等。 在提交之前不要忘记清理数据。…(反SQL注入)


而不是你的OnBlur和OnFocus解决方案:
placeholder='your name'

尝试
Send
而不是
href
发送按钮不起作用
所以你希望我们想象会发生什么?@Fred ii-谢谢你的支持,现在开始工作:)欢迎你,谢谢你的帮助,是的,我使用css作为按钮样式你使用的是超链接标记而不是css
if(isset($_POST['submit'])){
$name=$_POST['name'];
$phone=$_POST['phone'];
$xxx=$_POST['xxx'];
echo $name, $phone; //echoing data.
}