View Single Post
ישן 09-08-07, 23:45   # 1
Ron | CSite.co.il
חבר על
 
מיני פרופיל
תאריך הצטרפות: Jun 2007
גיל: 33
הודעות: 980

Ron | CSite.co.il לא מחובר  

[שאלה]mysql ועורך TinyMCE

שלום לכולם,
אני משתמש בעורך TinyMCE
ואני מנסה להכניס את מה שקיבלתי מהעורך ל mysql:
PHP קוד:
<?php
require "function.php";
echo 
connection_db();


if (isset(
$_POST['elm1'])){   //admin
 
$elm1 htmlspecialchars($_POST['elm1']);
 
mysql_query("INSERT INTO `admin` (index) VALUES ('$elm1')") or die(mysql_error()); 
 echo 
$elm1;
 }




?>
אבל זה מדפיס לי את השגיאה:
PHP קוד:
You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'index) VALUES ('<span class="example1">Test head 

לפי מה שהבנתי השגיאה היא שסוג המסד לא יכול לקבל ערכים של html ...
איך מסדרים את זה?

תודה מראש
  Reply With Quote