handle error in php

handle error in php

anameloanamelo Posts: 1Questions: 0Answers: 0
edited December 2011 in General
Hi, i'm new new to all this, and i have a BIG problem (to me offcorse) i'm using datatables plugin with editable and i can't see how to return an error in PHP if i can't add a record or de server is down. i've tried alot of stuff, but nothing trigers the error. he just add the record to the table even if he did not on database.
PLEASE Help me i'm despered.
an example if record correctly insert and other with message of an error.
Thanks a lot!!!!!!

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Assuming you mean the editable plug-in for DataTables, I don't know that code very well, but looking a the code there is:

    [code]
    function fnShowError(errorText, action) {
    alert(errorText);
    }
    [/code]

    as the default error function. It looks to me that if the server returns something other than the submitted value, then that error should show up - line 150. However, I suspect you might need to take a look at the code and add a few debug statements to see exactly what is going on.

    Allan
This discussion has been closed.