我试图通过一个变量发送成功消息,但它不起作用。如何在脚本中创建成功消息?
if (isset($_GET['addform']))
{
$name = mysqli_real_escape_string($link, $_POST['name']);
$sql = "INSERT INTO category SET
name='$name'";
if ($sql)
{
$success = '';
}
if (!mysqli_query($link, $sql))
{
$error = 'Error adding submitted category.';
include INC_DIR.'error.inc.php';
exit();
}
header('Location: .');
exit();
}
感谢@Philip G,英语不是我的母语。 – 2014-09-25 05:51:14
欢迎您! – 2014-09-25 05:57:09