what is the problem?
i have this message when insert?

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 '4'', `data_no` = ''1'', `note_date` = 1293628283, ' at line 4

and this is form

<form id="form1" name="form1" method="post" action="">
      <label for="textarea">notetext</label>
        <textarea name="notetext" id="notetext"></textarea>
        <label for="Submit">add</label>
        <input type="submit" name="add" value="add" id="add" />
	$sql_note = "
    INSERT INTO `notes` SET
		 `note_text` = '$note_text',
		 `note_contact` = '$note_contact',
         `data_no` = '$data_no',
         `note_date` = " . time() . ",
         `note_status` = 1
		if (!mysql_query($sql_note,$contacts))
  die('Error: ' . mysql_error());
echo "1 record added";

Recommended Answers

All 4 Replies

Member Avatar
`note_contact` = '$note_contact',

seems to be the problem. Does this field exists in your DB? I can't even see where the value ($note_contact) is passed.


i have it from path
and it's field

i have path like this
when remove quote it work good

Member Avatar

Yep, don't use quotes in a querystring (url).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.