views:

84

answers:

2

Hello all, i have made this script but then i press submit the jquery animation start but it will not submit it into the database with PHP :S.

Here is my script

http://pastebin.org/68943

Thanks

A: 

In your if statement that makes the insert you are checking for opret but the id in your input is opret_besked where as the name is opret. With inputs the id overrides the name. So change the name in your IF statement to opret_besked and everything will work.

Scott Gottreu
A: 

Like this:

    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.");
            }
    }
});

it insert the data in the database but the jquery animation dont work :/

Simon