אני לא יודע למה כל הבעיות חייבות ליפול דווקא אצלי
תראו מה קרה יצרתי טבלא אם עמודות ככה
PHP קוד:
CREATE TABLE `new` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`title` TEXT NOT NULL ,
`topic` TEXT NOT NULL
) ENGINE = MYISAM ;
עכשיו אני רוצה לשלוח לשם נתונים ככה:
אז זה index.html
HTML קוד:
<html>
<title>נסיון </title>
<form method="post" action="send.php">
<input type="text" name="title">
<font>שם הכתבה</font>
<hr>
<input type="text" name="topic">
<font>הכתבה</font>
<hr>
<input type="submit">
</form>
</html>
וזה send.php
PHP קוד:
<?php
$title= $_POST['title'];
$topic= $_POST['topic'];
mysql_connect('localhost','******','*******') or die("ERROR: ".mysql_error());
mysql_select_db('******') or die("ERROR: ".mysql_error());
mysql_query("INSERT INTO 'new'('title','topic') VALUES('$title','$topic')") or die("ERROR: ".mysql_error());
echo "אם אתה רואה את זה אתה יכול להפסיק להיות נואש כי הצלחת ";
?>
ה error שמופיע
קוד:
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''new'('title','topic') VALUES('נסיון','נסיון 2')' at line 1
בבקשהה תעזרו לי אני מתחרפן
*** אגבב כשאני מנסה לעשות את אותו דבר אבל לשלוח רק משתנה אחד למסד הנתונים זה כן מצליח .... מוזר...