这里有什么问题:
function del_lc() {
let la = $('#sela option:selected').text().toLowerCase();
let lb = $('.lbact').text();
let lc = $('.lcact').text();
let lcid = $('.lcact').attr('data-id');
let story = $('#storytxt').val();
var fn = 'del_lc';
$.post('index-pro.php', {la, lb, lc, lcid, story, fn}, function(data) {
console.log(data);
});
}
PHP
extract($_POST);
$sql = "insert into rec (what, la, lb, lc, story) values (:awhat, :ala, :alb, :alc, :astory)";
$st = $db->prepare($sql);
$st->execute(array(
":awhat" => 'lc',
":ala" => $_POST['la'],
":alb" => $_POST['lb'],
":alc" => $_POST['lc'],
":story" => $_POST['story'] // line 184
));
$sql = "delete from lc where id = :aid";
$st = $db->prepare($sql);
$st->execute(array(
":aid" => $_POST['lcid']
));
``` `Fatal error - Invalid parameter number: parameter was not defined in D:\code\s00\index-pro.php:184` .
有什么帮助吗?
1条答案
按热度按时间f2uvfpb91#
您在第184行出错,请改用以下代码: