Подскажите пожалуйста где ошибка.
<script>
function funcBefore () {
$("#info").text ("Ожидание...");
}
function funcSuccess () {
$("#info").text ("товар в корзине");
}
$(document).ready (function () {
$("#addcart").bind("click", function () {
$.ajax ({
url: "addcart.php",
type: "POST",
dataType: "html",
beforeSend: funcBefore,
success: funcSuccess
});
});
});
</script>
Содержимое файла addcart.php:
<?php
require_once ("connect_db.php");
$add_cart = "INSERT INTO add_cart (id, title, link_img)
SELECT id, title, link_img FROM add_items WHERE id=19";
$cart = $mysql_query($add_cart);
?>