i have a database, a page which get the data from database, and ajax code which modify the data(here adding as a friend)..
LOGIC
i succesfully get the data using php and in while loop(fetch_assoc) i get the email of the person who want to add other person as a friend, his email has been used for div id like <div id="xxx@yyy.com">
and an onclick function which send the email to the function which then send the data to ajax server and modify the database and come back using "added as a frind" in the div tag using innerhtml.
but it only works normal for the first click, on second click its just repeat the first operation i.e it uses the same id etc and send it to the ajax server, all i want is to add friend without refreshing the page....
please let me know what can be the possible solution