PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am using ajax to automatically reload the content from my mysql database on a given interval without refreshing the page. The code to display the rows from mysql is totally functional but once put into the function below (test.php being the mysql query file)
the page no longer reloads nor shows the mysql query. after troubleshooting, i noticed that echo and print seem to disrupt the javascript from working. upon removing the echo command the database is reloaded. even a simple echo of "text" brings the script to a failure. any insight on this issue would be much appreciated.
Last edited by joerosenthal on Tue Mar 28, 2006 8:47 pm, edited 1 time in total.
If "test.php" relies on variables that are set prior to the function being called, it will have problems finding them as they will be in a different scope than the code.
code works flawlessly if called outside ajax, refresh function shown here is php. it stops refreshing once the echo command is there, but if i put the entire code sans the echo, it refreshes