Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/229.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
Php jQuery我的提交按钮不起作用_Php_Jquery_Html - Fatal编程技术网

Php jQuery我的提交按钮不起作用

Php jQuery我的提交按钮不起作用,php,jquery,html,Php,Jquery,Html,首先,我是一个绝对的初学者,刚刚开始使用jQuery mobile编写代码 工作正常,但我创建了一个带有普通提交按钮的html表单。当我点击它时,什么都没有发生。。。也许s.o.能帮我渡过难关?!找不到我的错误 这是我的HTML表单: <form id='myform' action ='./update.php' method='POST'>"; while($daten = mysql_fetch_array($re, MYSQL_ASSOC)) {

首先,我是一个绝对的初学者,刚刚开始使用jQuery mobile编写代码

工作正常,但我创建了一个带有普通提交按钮的html表单。当我点击它时,什么都没有发生。。。也许s.o.能帮我渡过难关?!找不到我的错误

这是我的HTML表单:

<form id='myform' action ='./update.php' method='POST'>";
    while($daten = mysql_fetch_array($re, MYSQL_ASSOC))
        {
        echo "<b>Titel:</b><br><input name=titelbox type=text value=" . $daten["Titel"] . "><br>";
echo "<b>Beschreibung:</b><br><input name=beschreibungbox type=text value=" . $daten["Beschreibung"] . "><br>";
echo "<b>Kunde:</b><br><input name=kundebox type=text value=" . $daten["Kunde"] . "><br>";
echo "<b>Baustelle:</b><br><input name=baustellebox type=text value=" . $daten["Baustelle"] . "><br>";
echo "<b>Ort:</b><br><input name=ortbox type=text value=" . $daten["Ort"] . "><br>";
echo "<b>Conainergr&ouml;sse:</b><br><input name=cont_grbox type=text value=" . $daten["Cont_Gr"] . "><br>";
echo "<b>Inhalt:</b><br><input name=inhaltbox type=text value=" . $daten["Inhalt"] . "><br>";
echo "<b>Bemerkung:</b><br><input name=bemerkungbox type=text value=" . $daten["Bemerkung"] . "><br>";
echo "<b>Zugewiesen:</b><br><input name=zugewiesenbox type=text value=" . $daten["Zugewiesen"] . "><br>";
echo "<b>Status:</b><br><input name=statusbox type=text value=" . $daten["Status"] . ">";
echo "<b>ID:</b><br><input name=idbox type=text value=" . $daten["ID"] . ">";

       }
}
echo"</div>";

mysql_close($link);
?>
<br>
<input type='submit' name='my_button' value='save'> 
<br>
</div><!-- /content -->
</body>
</html>
”;
而($daten=mysql\u fetch\u数组($re,mysql\u ASSOC))
{
回声“滴度:

”; 回声“Beschreibung:

”; 回声“Kunde:

”; 回声“Baustelle:

”; 回声“Ort:

”; echo“Conainergrö;sse:

”; 回声“Inhalt:

”; 回声“Bemerkung:

”; 回声“祖格维森:

”; 回显“状态:
”; 回显“ID:
”; } } 回声“; mysql_close($link); ?>

这是我的标签之间的内容:

<link rel="stylesheet" href="css/themes/damke_mobile.min.css" />
<link rel="stylesheet" href="css/themes/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile.structure-1.4.2.min.css" />
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>

----更新---- 当我注释掉.js文件时,效果很好,但这不是解决方案

这是我的整个页面:

<!DOCTYPE html>
<html>
<head>
<title>Damke Mobile</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/themes/damke_mobile.min.css" />
<link rel="stylesheet" href="css/themes/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile.structure-1.4.2.min.css" />
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
<link rel="stylesheet" href="mobile.css">
</head>
<body>
<div data-role="header">
<h1>Damke Portal - Details</h1>
<a href="mobile.php">Home</a>
</div><!-- /header -->
<div role="main" class="ui-content">
<?php
$ID = $_GET["ID"];
$server = "localhost";  
$datenbank = "****e";
$username = "****e";
$passwort = "*****1";
$link = mysql_connect($server, $username, $passwort);
if (!$link)            die(mysql_error());

$db = mysql_select_db($datenbank, $link);

if ($db)
    {
    $re = mysql_query("SELECT * FROM Termine_Test where ID='$ID'", $link);
    echo"<div id='myform'><table width='90%'><form id='myform' action ='./update.php' method='POST'>";
    while($daten = mysql_fetch_array($re, MYSQL_ASSOC))
        {
    echo "<b>Titel:</b><br><input name=titelbox type=text value=" . $daten["Titel"] . "><br>";
echo "<b>Beschreibung:</b><br><input name=beschreibungbox type=text value=" . $daten["Beschreibung"] . "><br>";
echo "<b>Kunde:</b><br><input name=kundebox type=text value=" . $daten["Kunde"] . "><br>";
echo "<b>Baustelle:</b><br><input name=baustellebox type=text value=" . $daten["Baustelle"] . "><br>";
echo "<b>Ort:</b><br><input name=ortbox type=text value=" . $daten["Ort"] . "><br>";
echo "<b>Conainergr&ouml;sse:</b><br><input name=cont_grbox type=text value=" . $daten["Cont_Gr"] . "><br>";
echo "<b>Inhalt:</b><br><input name=inhaltbox type=text value=" . $daten["Inhalt"] . "><br>";
echo "<b>Bemerkung:</b><br><input name=bemerkungbox type=text value=" . $daten["Bemerkung"] . "><br>";
echo "<b>Zugewiesen:</b><br><input name=zugewiesenbox type=text value=" . $daten["Zugewiesen"] . "><br>";
echo "<b>Status:</b><br><input name=statusbox type=text value=" . $daten["Status"] . ">";
echo "<b>ID:</b><br><input name=idbox type=text value=" . $daten["ID"] . ">";

       }
}
echo"</div>";

mysql_close($link);
?>
<br>
<input type='submit' name='my_button' value='save'> 
</form>
<br>
</div><!-- /content -->
</body>
</html>

丹克移动电话
Damke门户-详细信息

我不确定,但我认为如果您在某处添加结束表单标记,情况会更好。请查看您的代码和您的部门,您的部门未正确关闭:

以下是此时代码中的内容:

<div role="main" class="ui-content">
    <div id='myform'>
        <table width='90%'>
            <form id='myform' action ='./update.php' method='POST'>

    </div>
    <input type='submit' name='my_button' value='save'> 
            </form>
</div><!-- /content -->

这对SQL注入是开放的,您的$ID直接来自$\u GET

使用:可能因为您没有关闭表单标记,表单标记将不会这样工作,您在PHP代码内部,而不是外部,我们可以看到页面的第一部分吗?我想看看“我建议您更好地优化代码”。很难阅读。在上面添加了我的全部代码…谢谢,但这不会影响任何事情。。。刚刚加上。。没什么。如果这个问题让你恶心,我很抱歉,但是。。。我支持你在你的按钮后面加上,是吗?这有点奇怪,因为jquery(没有任何顺序)不会阻止表单提交
$re = mysql_query("SELECT * FROM Termine_Test where ID='$ID'", $link);