Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.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
我的jquery mobile无法使用我的php代码_Php_Jquery Ui_Jquery Mobile - Fatal编程技术网

我的jquery mobile无法使用我的php代码

我的jquery mobile无法使用我的php代码,php,jquery-ui,jquery-mobile,Php,Jquery Ui,Jquery Mobile,下面是我的代码(jquerymobile和php),我正试图插入到数据库中,并回应以下消息(请填写所有字段并完成注册)也就是说,如果用户完成了字段或未完成以下消息显示,但其中没有一个正在使用我的jquery移动代码,并且正在使用我的正常站点,我如何修复此问题?如果您使用我的代码,我将不胜感激谢谢 <?php $db= “user”; $connect = mysql_connect(“localhost“, “alluser”, “six4”)or die(“could not conne

下面是我的代码(jquerymobile和php),我正试图插入到数据库中,并回应以下消息(请填写所有字段并完成注册)也就是说,如果用户完成了字段或未完成以下消息显示,但其中没有一个正在使用我的jquery移动代码,并且正在使用我的正常站点,我如何修复此问题?如果您使用我的代码,我将不胜感激谢谢

<?php
$db= “user”;
$connect = mysql_connect(“localhost“, “alluser”, “six4”)or die(“could not connect”);
Mysql_select_db($db) or die (“could not select database”);

If (isset($_POST['submit'])){
If(empty($_POST['name']) OR empty($_POST['email']) OR empty($_POST['add'])){
$msg = 'pls fill all field';

$name = ($_POST['name']);
$email = ($_POST['email']);
$address = ($_POST['add']);

mysql_query(“INSERT INTO people (Name, Email, Address”) VALUES ('$name, $email, $address')”) or die (mysql_error());
$msg='registration complete ';
}
}
?>
    <!DOCTYPE html>
<html>
    <head>
    <title>Home</title>
    <link rel="stylesheet" href="css/jquery.mobile-1.0a1.min.css" />
    <script src="js/jquery-1.4.3.min.js"></script>
    <script src="js/jquery.mobile-1.0a1.min.js"></script>
</head>
<body>

<div data-role="page">

    <div data-role="header">
        <h1>User</h1>
    </div>

    <div data-role="content">
        <?php echo “$msg”; ?>
      <form name=“form” action=“” method=“post”>
<label for=“name”>Name</label>
<input type=“text” name=“name” />
<label for=“email”>Email</label>
<input type=“text” name=“email” />
<label for=“address”>Address</label>
<input type=“text” name=“add” />

<input type=“submit” name=“submit” value=“Submit” />
</form>
    </div>

    <div data-role="footer">
        <h4>Page Footer</h4>
    </div>
</div>

</body>
</html>

家
使用者
名称
电子邮件
地址
页脚

在您的
if
语句之后检查支架位置。您可以检查空值,但如果您找到它们,就不会以有意义的方式更改程序流

另外,用真实的引号替换你的卷曲引号。并检查SQL注入。并再次检查您的MySQL调用。根据编写方式,在得到
$msg
回音之前,您将从PHP中得到一个错误