473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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 6775
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

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

Similar topics

16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
5
by: PAUL | last post by:
Hello, I have 2 tables with a relationship set up in the dataset with vb ..net. I add a new record to the parent table then edit an existing child record to have the new parent ID. However when I...
7
by: Matt Silberstein | last post by:
I have a data intensive web app I am developing. The core of the app will do a db query and build a page. I plan on getting the data as xml and feeding that and a xslt stylesheet to the browser....
2
by: rodchar | last post by:
hey all, i saw an update panel example one time where they put a button outside the update panel and a textbox inside the panel and setup a trigger on the update panel to update when the button...
1
by: ashish ranjan | last post by:
Hi there, I m new in Ajax and right now i m trying to do small operation on gridview like add row in gridview, update and delete row from gridview with the help of Ajax. Please help me in...
1
by: ashish ranjan | last post by:
Hi there , I m in great need to know: How to select row from grid and update record in database using Ajax. u can use c#,.net and java script. Thanks in advance, Ashish Ranjan
2
by: DanWeaver | last post by:
I have a page where layout of buttons and listboxes etc is important - I would like to make use of Ajax Update panel to asynchronously update various part of the page- in Vis studio whenever I use...
5
by: HockeyFan | last post by:
We have an update panel that has a gridview with checkboxes and other items in each row. We went to the RowCreated event in the codebehind, to set an attribute on a checkbox in each row, to...
4
by: BiffMaGriff | last post by:
Hello, I have a GridView that I put inside an update panel. I have a control that attaches to the datasource of the gridview that filters the data, databinds the gridview and then updates the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.