Configuring Servers and Databases with Chrome - When Things Go Wrong (Page 3 of 5 )
Assuming we want todump information to the screen, we could make the following changes to thedoServerRequestfunction in our newssearch.js code:
For developers just beginning to work with PHP, includingechostatements to use the browser to display variable values is often the best way to identify many of the most common PHP coding errors. Displaying variable values is one sure way to quickly identify problems related to misuse of the single quote (used to form strings with special characters), double quote (used to assemble strings that include the evaluation of variables), and terminating semicolons. Echoing variables is also a good tool to find misspelled variable names and the occasionally misplaced$variable prefix.
We change our command parser to remove thedebug echostatement and uncomment the call tocheck_userthat will now be used with a database of valid user identifiers.