merck_delmoro Posted May 13, 2009 Share Posted May 13, 2009 I want to create a website that enables a log in user to view all the records into the database but when the authorized user update some records the website that viewing by the other log in user will automatically updated and can change automatically Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/ Share on other sites More sharing options...
Ken2k7 Posted May 13, 2009 Share Posted May 13, 2009 Such details. Now that those who have read that post understands what you're trying to do, please explain what you need help on. Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/#findComment-832871 Share on other sites More sharing options...
gevans Posted May 13, 2009 Share Posted May 13, 2009 Well, you're definetly going to be using PHP and AJAX... If you have no code written yet I'd recommend hitting some tutorials, PHP MySQL jQuery Then get specific with login scripts, basic cms (a form to update a database). Then attempt this project and come back when you get stuck Oh, and by the way, you'll need a javascript timer to execture a call every x seconds to keep checking if the database has changed! (just remember) Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/#findComment-832874 Share on other sites More sharing options...
Ken2k7 Posted May 13, 2009 Share Posted May 13, 2009 Oh, and by the way, you'll need a javascript timer to execture a call every x seconds to keep checking if the database has changed! (just remember) execture ... It sounds like a timer is hard to write, but it's really just a call to a JavaScript function. Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/#findComment-832877 Share on other sites More sharing options...
gevans Posted May 13, 2009 Share Posted May 13, 2009 Oh, and by the way, you'll need a javascript timer to execture a call every x seconds to keep checking if the database has changed! (just remember) execture ... It sounds like a timer is hard to write, but it's really just a call to a JavaScript function. yup, just one simple line; timer = setTimeout('aFunction();',2000); Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/#findComment-832878 Share on other sites More sharing options...
Ken2k7 Posted May 13, 2009 Share Posted May 13, 2009 yup, just one simple line; timer = setTimeout('aFunction();',2000); Wrong! Well I guess it depends on aFunction(), but care to try again? Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/#findComment-832889 Share on other sites More sharing options...
gevans Posted May 13, 2009 Share Posted May 13, 2009 yup, just one simple line; timer = setTimeout('aFunction();',2000); Wrong! Well I guess it depends on aFunction(), but care to try again? Care to explain to me why that's wrong? That little bit of javascript will call a function called aFunction() every 2 seconds..... I wonder how that's wrong?? Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/#findComment-832891 Share on other sites More sharing options...
Ken2k7 Posted May 13, 2009 Share Posted May 13, 2009 setTimeout() only delays execution. So unless aFunction() calls setTimeout again, it'll only work once. I think you meant setInterval(). Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/#findComment-832893 Share on other sites More sharing options...
gevans Posted May 13, 2009 Share Posted May 13, 2009 Next time I'll write out a function as well, that should sort it!! Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/#findComment-832896 Share on other sites More sharing options...
merck_delmoro Posted May 13, 2009 Author Share Posted May 13, 2009 thnx guys for I'll gonna used all of your suggestions Link to comment https://forums.phpfreaks.com/topic/157892-solved-i-am-new-in-php-and-ajax-can-someone-help-me-to-solve-my-problem/#findComment-832911 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.