Jump to content

ajax and php to get data every minute ( time based )


auday1982

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.