Đối với chi tiết đầy đủ về chủ đề này tham khảo tài liệu chính thức 5 MySQL tại . Khi tạo một bảng dữ liệu mới, bạn phải quyết định giá trị là bắt buộc, và đánh dấu chúng với các tài sản không NULL, | Server-Side Techniques with PHP and MySQL catching potential errors with Firefox var rootNodeName if rootNodeName parsererror throw Invalid XML Structure n getting the root element the document element xmlRoot testing that we received the XML document we expect if rootNodeName response throw Invalid XML strUcture n the Value we need to display is the child of the root response element responseText display the user message myDiv myDivElement Server says the answer is responseText 4. Create a file called php load the error handling module require_once specify that we re outputting an XML document header Content-Type text xml calculate the result firstNumber _GET firstNumber secondNumber _GET secondNumber result firstNumber secondNumber create a new XML document dom new DOMDocument create the root response element and add it to the document response dom- createElement response dom- appendChild response add the calculated sqrt value as a text node child of response responseText dom- createTextNode result response- appendChild responseText build the XML structure in a string variable xmlString dom- saveXML output the XML string echo xmlString 5. Finally create the error-handler file php set the user error handler method to be error_handler set_error_handler error_handler E_ALL error handler function function error_handler errNo errStr errFile errLine . . clear any output that has already been generated i f ob_get_lengthO ob_clean output the error message error_message ERRNO . errNo . chr 10 . TEXT . errStr . chr 10 . LOCATION . errFile . line . errLine echo error_message prevent processing any more PHP scripts exit 6. Load http localhost ajax foundations morephp and play with it. 74 Chapter 3 Figure PHP Parameters and .