Nasıl bir php jquery veritabanı ekleme için bir Kelime Filtre eklemek için?

0 Cevap php

I want to make a PHP database insert with jQuery. How do I add a Keyword Filter in the code? If I write all the forbidden words in a xml out file forbidden.xml Thanks.

sayfa eklemek:

<script type="text/javascript" src="../jquery-1.4.2.min.js"></script>
<script>
function send(){
    var toUrl = "Data.php";
    var method = 'GET';
        $.ajax({
        type:"POST",
        url:"Data.php",
        data:{
            name:$("#name").val(),
            sex:$("#sex").val()
        },
        beforeSend:function(){
            $("#display").html("Loading...");
        },
        success:function(data){
            $("#display").html(decodeURI(data));
            document.getElementById("display").innerHTML = "insert success";
        },
        error:function(data){
            document.getElementById("display").innerHTML = "insert error";
        }
    });
}
</script>
<form name="input">
    name: <input type="name" name="name" id="name" />
    sex: <input type="sex" name="sex" id="sex" />
    <input type="button" id="Submit" value="Submit" onclick="send()" />
</form> 
<div id="display"></div>

forbidden.xml

<?xml version="1.0" encoding="utf-8"?>
<dictionary language="EN">
    <string>aaa</string>
    <string>bbb</string>
    ...
</dictionary>

0 Cevap