Get data from database without refresh whole page

Posted by stefanz on Stack Overflow See other posts from Stack Overflow or by stefanz
Published on 2010-03-24T23:45:52Z Indexed on 2010/03/24 23:53 UTC
Read the original article Hit count: 394

Filed under:
|
|

Hello everybody. My project is about a school admin I have a page called : createClass.php, where user inserts grade, profile etc. When he press "submit" page called createdClass.php is loading. Inside this page I have all code which insert data into database and also an "if" structure which says : "Class already exists" if in database is another class with same specifications. Also in second page (createdClass.php) i have a small table which shows the place of each student. First time all cells are green (this means that place is free) and if i click one of them appear a popup window which let me to add info about student from that place. If a place is busy the cell will be red (take a look here : http://screencast.com/t/NzM2YzYxNjct). The big problem is that the cell will be red only after refresh the page (the place ask for data from database). If I press refresh appears "class already exists". To test the code i added in a comment all lines which verify and add respectively classroom . I think my problem can be solved with ajax. I'm waiting for an answer. Regards Stefan

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about php