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 Quote Link to comment 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. Quote Link to comment 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) Quote Link to comment 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. Quote Link to comment 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); Quote Link to comment 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? Quote Link to comment 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?? Quote Link to comment 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(). Quote Link to comment 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!! Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.