3.0 beta 2

How to delere an sql record clicking by a button ?

How to delere an sql record clicking by a button using php + sql

For ex: let say i have 23 record in my data base
and i wanna show all and after that i wanna delete record nr. 5

With just a click on a button "delete"
michael
August 18,
You'll write an onclick event that will return the row values to you. You'd need a unique identifier for the row (like a unique ID)

Once you have the unique ID, you can use XMLHttp to run a PHP file and pass it that value. The PHP will then delete the record out of the database.

ie,

1) On click/select of a row, return the unique value of the row you clicked (normally into a hidden field)
2) Use XMLHttp to get Javascript to execute a server side script (could be ASP,PHP etc) and pass it that value.
3) You server side script would then delete the record out of the database based on the value you passed to it.

Good luck
AcidRaZor
August 19,
Hey AcidRaZor,

Thanks for the tip... but I don't know XMLHttp... where would i start learning to use it? Could you at least illustrate to me how it works and how to do it?...


thanks
glennlosentes
glennlosentes
August 24,
I dont know, google xmlhttp ;)
AcidRaZor
August 25,
Search in forum on XMLHTTP is a good start and find examples google has som searching facilities...
John Ophof http://open-modeling.sourceforge.net
August 25,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.