469,342 Members | 6,660 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

how to update record using ajax and php

254 100+
Hi

I am displaying record using php. I am giving the record structure in html format.

Admin will allow user to view the no. of record user will view.
Expand|Select|Wrap|Line Numbers
  1.  
  2. <table>
  3. <tr><td>name</td><td>age</td><td>show status</td>
  4. <tr><td>xyz</td><td>12</td><td>yes</td>
  5. <tr><td>abc</td><td>22</td><td>yes</td>
  6. <tr><td>mno</td><td>32</td><td>yes</td>
  7. <tr><td>pqr</td><td>19</td><td>yes</td>
  8. </table>
Say for first record when User will click yes it will update its corresponding record to the database to no i.e not visible to user and it will then be not visible to user at front end.

How this will done using Ajax and php.
Jan 31 '08 #1
5 6574
acoder
16,027 Expert Mod 8TB
Say for first record when User will click yes it will update its corresponding record to the database to no i.e not visible to user and it will then be not visible to user at front end.
Is this for the admin or for the user (the clicking)?
Feb 1 '08 #2
mukeshrasm
254 100+
Is this for the admin or for the user (the clicking)?
This is for admin. Admin will decide which item he wanted to show to user.
Feb 2 '08 #3
acoder
16,027 Expert Mod 8TB
For the show status field, either use a button, checkbox or radio button. Use onclick to trigger the Ajax function. Depending on the selection (yes/no), set the field in the database using PHP.
Feb 2 '08 #4
mukeshrasm
254 100+
For the show status field, either use a button, checkbox or radio button. Use onclick to trigger the Ajax function. Depending on the selection (yes/no), set the field in the database using PHP.
Actually in project I wanted to show the status using image(Icons) so when that image will be clicked its corresponding status image will display means if it is active is then active image will come and if deactive then deactive image will come.
Feb 5 '08 #5
acoder
16,027 Expert Mod 8TB
Actually in project I wanted to show the status using image(Icons) so when that image will be clicked its corresponding status image will display means if it is active is then active image will come and if deactive then deactive image will come.
Then just change the src property of the image to "active.gif" or whatever.
Feb 5 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

16 posts views Thread by Philip Boonzaaier | last post: by
5 posts views Thread by PAUL | last post: by
7 posts views Thread by Matt Silberstein | last post: by
2 posts views Thread by rodchar | last post: by
2 posts views Thread by DanWeaver | last post: by
5 posts views Thread by HockeyFan | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.