Fatal error: Call to undefined function GetSQLValueString() in C:\AppServ\www\pgtong\menu\save-commu.php on line 59
นี่โค้ดค่ะ
<html>
<head>
<title>บันทึกรูปภาพ</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
</style>
</head>
<body>
<p>
<?php
mysql_connect("localhost","root","12345678") or die (mysql_error());
mysql_select_db("asu_system");
mysql_query("SET character_set_results=utf8");
mysql_query("SET character_set_client=utf8");
mysql_query("SET character_set_connection=utf8");
for($i=0;$i<=(int)($_POST["hdnLine"]);$i++)
{
$Str_file = explode(".",$_FILES['filUpload']['name'][$i]); // แยกชื่อไฟล์ด้วย "." ค่าที่ได้จะเป็น Array ครับ
echo $Str_file['0']."<br>";
echo $newname."<br>";
if($_FILES["fileUpload"]["name"][$i] != "")
{
if(move_uploaded_file($_FILES["fileUpload"]["tmp_name"][$i],"myfile/".$_FILES["fileUpload"]["name"][$i]))
{
}}}
//*** Insert Record ***//
$strSQL = "INSERT INTO integ_inno";
$strSQL .="
inno_id,id_act,inno_namee,innoo_id,detail,filUpload) VALUES ('".$_POST["inno_id"]."','".$_POST["id_act"]."', '".$_POST["inno_namee"]."','".$_POST["innoo_id"]."',
'".$_POST["detail"]."',
'".$_FILES["fileUpload"]["name"][0]."')";
$objQuery = mysql_query($strSQL);
//*** update***//
$strSQL = sprintf("UPDATE project63 SET integ_inno=%s WHERE pro63_id=%s",
GetSQLValueString($_POST['integ_inno'], "int"),
บรรทัดนี้ค่ะที่ผิด
GetSQLValueString($_POST['pro63_id'], "int"));
$objQuery = mysql_query($strSQL);
$updateGoTo = "add.php?id_act=" . $_POST["id_act"] . "";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
///////////////////////////////////////////////////////////////////////////////
mysql_close();
?>
บันทึกข้อมูลสำเร็จ รอสักครู่เพื่อกลับสู่หน้าหลัก</a></p>
</body>
</html>
Fatal error: Call to undefined function GetSQLValueString() in ขึ้นแบบนี้แก้ยังไงค่ะ php
นี่โค้ดค่ะ
<html>
<head>
<title>บันทึกรูปภาพ</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
</style>
</head>
<body>
<p>
<?php
mysql_connect("localhost","root","12345678") or die (mysql_error());
mysql_select_db("asu_system");
mysql_query("SET character_set_results=utf8");
mysql_query("SET character_set_client=utf8");
mysql_query("SET character_set_connection=utf8");
for($i=0;$i<=(int)($_POST["hdnLine"]);$i++)
{
$Str_file = explode(".",$_FILES['filUpload']['name'][$i]); // แยกชื่อไฟล์ด้วย "." ค่าที่ได้จะเป็น Array ครับ
echo $Str_file['0']."<br>";
echo $newname."<br>";
if($_FILES["fileUpload"]["name"][$i] != "")
{
if(move_uploaded_file($_FILES["fileUpload"]["tmp_name"][$i],"myfile/".$_FILES["fileUpload"]["name"][$i]))
{
}}}
//*** Insert Record ***//
$strSQL = "INSERT INTO integ_inno";
$strSQL .="inno_id,id_act,inno_namee,innoo_id,detail,filUpload) VALUES ('".$_POST["inno_id"]."','".$_POST["id_act"]."', '".$_POST["inno_namee"]."','".$_POST["innoo_id"]."',
'".$_POST["detail"]."',
'".$_FILES["fileUpload"]["name"][0]."')";
$objQuery = mysql_query($strSQL);
//*** update***//
$strSQL = sprintf("UPDATE project63 SET integ_inno=%s WHERE pro63_id=%s",
GetSQLValueString($_POST['integ_inno'], "int"), บรรทัดนี้ค่ะที่ผิด
GetSQLValueString($_POST['pro63_id'], "int"));
$objQuery = mysql_query($strSQL);
$updateGoTo = "add.php?id_act=" . $_POST["id_act"] . "";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
///////////////////////////////////////////////////////////////////////////////
mysql_close();
?>
บันทึกข้อมูลสำเร็จ รอสักครู่เพื่อกลับสู่หน้าหลัก</a></p>
</body>
</html>