auday1982 Posted June 13, 2008 Share Posted June 13, 2008 Hello my name is auday and i am new to ajax ... to be honest i am a beginner to php and dont know more than the name of and the libraries of ajax for me ajax is not important now .. i need to learn php but i have a question ... i have a form that post data to data base ... this is a html/php page ... the form is separated from the form processor file .. my table includes these id( auto ) ,time(int), tag (varchar), message(text) then on index.php i need ajax to do this every minute 1- go and connect to data base 2- get all lines inserted in data base 3- refresh the container ( div ) for example i post data and it will be inserted in the data base like this id( auto ) ,time(int), tag (varchar), message(text) 1 , 40 , Something , there is something just happened now i want ajax within one minute to display this on my website to current and new visitors ( Minute 40 ) Something : there is something just happened now so i am going to create a game cast so i need to display time , what happend ( tag ) , and details of that ( if goal , then who scored it and how) so what do you think ... is it possible ...and how to do it ... with php because it will include a table also for the time bar and the icons for the tags ( ball for goals , yellow card image for yellow cards and more ) so i need ajax to go and get all lines and sort them from high to low so the new ones will be up some effect like it fade in ... or color different can be good could you please help me thanks Quote Link to comment Share on other sites More sharing options...
auday1982 Posted June 13, 2008 Author Share Posted June 13, 2008 hello sorry forgot to mention that i need this to be like every minute ... without page referesh ajax retrieve the data and display it i thought about editing any of the ajax chat systems and make it one way ,,, me or my friends send to the page and other people see what happened i am from iraq and we love soccer or what we call it TOOBA or football , and i know friends who lives in iraq/mideast and can post the minute to minute game cast and we can see it and read it and know what is going on .. or come back after the match to read the most important events ... not just the result so now you know the purpose of this thanks Quote Link to comment Share on other sites More sharing options...
angelfashion Posted September 8, 2008 Share Posted September 8, 2008 any one have ajax tutorial? thq Quote Link to comment Share on other sites More sharing options...
corbin Posted September 9, 2008 Share Posted September 9, 2008 Find a basic AJAX tutorial, such as the one on W3Schools (Google), and then look into setTimer() Quote Link to comment Share on other sites More sharing options...
simonrs Posted September 11, 2008 Share Posted September 11, 2008 I'd recommend the prototype library (www.prototypejs.org) and it's Ajax.PeriodicalUpdater class. Check the API there for more info. Quote Link to comment Share on other sites More sharing options...
Smystery Posted October 17, 2008 Share Posted October 17, 2008 I'd recommend the prototype library (www.prototypejs.org) and it's Ajax.PeriodicalUpdater class. Check the API there for more info. thanks for recommentation. 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.