2009-12-26 72 views
0

我已经做了这个脚本,但然后我按提交jquery动画开始,但它不会提交到数据库与PHP:S。jquery停止插入数据库

这里是我的脚本

http://pastebin.org/68943

感谢

+2

没有人会做你的工作你/调试整个程序。尝试将其分解成说明问题的最小代码集 – 2009-12-26 23:57:46

回答

0

在你的if语句,让你检查opret但在你输入的ID是opret_besked地方的名称是opret插入。通过输入,id会覆盖名称。因此,将您的IF声明中的名称更改为opret_besked,并且所有内容都将起作用。

0

像这样:

var opretform = $("#opret_besked").val; 
$.ajax({ 
    type: "POST", 
    url: "tagwall.php", 
    data: "opret_besked=" + opret_besked, 
    success: function(response) { 
      if(response == 1) { 
       $("#response").append("Success!"); 
      } else { 
       $("#response").append("Fejl."); 
      } 
    } 
}); 

它插入数据库中的数据,但jQuery的动画不工作:/