php and ajax

Discussion in 'PHP' started by philpbvc3232, May 17, 2011.

  1. #1
    i want to create a simple iphone webapp as a to do list using html, css and javascript

    the way i want the webapp is i will list about 10 tasks and each task will have an off and on image, the title will be on the left edge and image on the right edge

    by default when i load the app for first time i want all the task images to show as off.jpg when i tap on an off image after completing a task i want this off image to change to on.jpg and after this when i load the app later if i have tapped on any off image i want the updated image which should be on and the others which were not tapped to show off.jpg

    should this change of images be done using php and ajax using onPress method and how do i change the state of an image after it is tapped should i execute an sql query and initially set it to off and onPress should i execute an update query and change the column value to on and read this value back and set the image to be on.jpg

    which is the best way to go about
     
    philpbvc3232, May 17, 2011 IP