【php开源代码栏目提醒】:网学会员鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“updated.php”一文,供大家参考学习
<?php
include_once('../Connections/config.php');
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
if ((isset($_POST['modifyID'])) && ($_POST['modifyID'] != "")) {
$deleteSQL = sprintf("DELETE FROM guestbook WHERE ID=%s",
GetSQLValueString($_POST['deletionID'], "int"));
mysql_select_db($database_adesGBook, $link_id);
$Result1 = mysql_query($deleteSQL, $link_id) or die(mysql_error());
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>修改</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../forText.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
color: #FF3300;
font-size: 12px;
}
-->
</style>
</head>
<body>
<table width="600" border="0" cellspacing="1" cellpadding="2">
<tr>
<td height="30" class="forTableBgLeft"><div align="center">修改成功</div></td>
</tr>
<tr>
<td class="forTableBgRight"><div align="center">留言ID: <?php echo $_GET['modifyID']; ?> 成功修改</div></td>
</tr>
</table>
</body>
</html>