query("INSERT INTO foundation (site_name, site_seo, site_key, site_ms,site_icp, light_logo, dark_logo, reuser , loginuser, type) VALUES ('$site_name', '$site_seo', '$site_key', '$site_ms', '$site_icp', '$light_logo', '$dark_logo', '$reuser' , '$loginuser' , '$type')");
} else {
// 如果记录数不为0,说明数据库中已经存在数据,执行更新操作
$data = $con->query("UPDATE foundation SET site_name='$site_name', site_seo='$site_seo', type='$type', site_key='$site_key', site_ms='$site_ms', site_icp='$site_icp', light_logo='$light_logo', dark_logo='$dark_logo', reuser='$reuser', loginuser='$loginuser' WHERE id=1");
}
if ($data > 0) {
echo " ";
} else {
echo ("");
// echo "Error updating record: " . $con->error;
}
}
$con->close();
?>