Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,030

HOME > PHP > PHP Forum > รบกวนดูฟอร์ม Insert ข้อมูล Fatal error: Call to undefined function get_magic_quotes_gpc() in 'xxx'



 

รบกวนดูฟอร์ม Insert ข้อมูล Fatal error: Call to undefined function get_magic_quotes_gpc() in 'xxx'

 



Topic : 029504

Guest




/////AdminAddType.php

Code (PHP)
<?php require_once('Connections/BBBA.php'); ?>
<?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;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FrmAddType")) {
  $insertSQL = sprintf("INSERT INTO typedb (NameType) VALUES (%s)",
                       GetSQLValueString($_POST['TxtTypeName'], "text"));

  mysql_select_db($database_BBBA, $BBBA);
  $Result1 = mysql_query($insertSQL, $BBBA) or die(mysql_error());

  $insertGoTo = "AddOK.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Admin Add type</title>
</head>

<body>

<form action="<?php echo $editFormAction; ?>" method="POST" name="FrmAddType" id="FrmAddType">
  <table width="473" height="73" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="164" height="38" bgcolor="#FF99FF">&#3594;&#3639;&#3656;&#3629;&#3611;&#3619;&#3632;&#3648;&#3616;&#3607;&#3626;&#3636;&#3609;&#3588;&#3657;&#3634; &nbsp;::&nbsp;&nbsp;</td>
      <td width="309" bgcolor="#FF99FF"><label>
        <input name="TxtTypeName" type="text" id="TxtTypeName" size="40" maxlength="40" />
      </label></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="BtnAddType" type="submit" id="BtnAddType" value="&#3626;&#3656;&#3591;&#3586;&#3657;&#3629;&#3617;&#3641;&#3621;" />
        <input name="BtnCancel" type="reset" id="BtnCancel" value=" &#3618;&#3585;&#3648;&#3621;&#3636;&#3585; " />
      </label></td>
    </tr>
</table>
  <input type="hidden" name="MM_insert" value="FrmAddType">
</form>
</body>
</html>






/////AddOK.php

Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Add OK</title>
</head>

<body>
<table width="501" height="43" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#FF99FF"><div align="center"><strong>เพิ่มข้อมูลเรียบร้อย&nbsp;&nbsp;</strong> <a href="AddminAddType.php">คลิกกลับไปหน้าที่แล้ว</a></div></td>
  </tr>
</table>
</body>

</html>



รันแล้วเป็นอย่างนี้ Line5 -*-แก้ยังไงอ่ะค่ะ

Code
Fatal error: Call to undefined function get_magic_quotes_gpc() in C:\AppServ\www\BBBA\AdminAddType.php on line 5



รบกวนช่วยดูทีน่ะค่ะ



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-07-24 10:10:12 By : อี๊ฟ View : 1925 Reply : 2
 

 

No. 1



โพสกระทู้ ( 2,794 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์


http://www.phpbbthailand.com/viewtopic.php?f=6&t=3035&start=0






Date : 2009-07-24 10:38:50 By : panyapol
 


 

No. 2

Guest


-*-ก็ยังไม่เข้าใจอยู่ดีค่ะ *-*
Date : 2009-07-24 11:21:06 By : อี๊ฟ
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : รบกวนดูฟอร์ม Insert ข้อมูล Fatal error: Call to undefined function get_magic_quotes_gpc() in 'xxx'
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่