如果我點擊提交它只刷新網站。 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您的交易