如果我点击提交它只刷新网站。 connect.php是正确的。但有些事情必须是错误的。mysql脚本只能重新加载
in.php
<form id="mathe1" action="script.php" method="post">
<input name="nummer" type="number" value=""/><br><br>
<label id="label"><p>Hausübung</p></label>
<textarea name="hu" cols="60" rows="5"></textarea><br><br>
<input name="Submit1" type="submit" value="Senden"/>
</from>
的script.php:
<?php
include('include/connect.php');
$nummer = $_POST['nummer'];
$hu = $_POST['hu'];
$db = "hu";
if (empty($nummer)) {
header('Location:in.php');
}
if (empty($hu)) {
header('Location:in.php');
}
else {
$sql = "INSERT INTO $db VALUES ('$nummer','$hu')";
$query = mysql_query($sql);
}
?>
FYI您的交易