You
should also invoke the mysql_
error() function to see what
problems the database reports.
??? A useful debugging technique
when working with XML data is
to verify that your PHP script is
returning valid XML. To see the
result of the PHP page, either
use JavaScript to access ajax.
responseText (in the handle-
Response() function) or
submit your form to the PHP
page directly (without using
JavaScript).
??? For directly viewing XML in your
Web browser, you??™ll want to
use a browser that supports the
format. At the time of this writing,
this includes recent versions
of Internet Explorer and Firefox,
but not Safari.
(cont.)
validate the form data p. 68
??? For more information on the
form validation routines, see the
extra bits section for Chapter 4,
???adding records.???
??? The XML data will have zero or
more elements called error. Any
failed validation will result in
another error element, whose
value will match the name of the
corresponding form fi eld. The
point of this XML data is to indicate
which form fi elds weren??™t
properly fi lled out. If all of the
validation tests were passed,
there will be none of these
elements.
Pages:
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85