This is my form.

If i click the status content like progress or dsgs a textfield should appear. If i type text in it and click outside or press enter the old content should updated with the new one. I need it to be done with ajax and php. I am a beginner in php and ajax. Any reference or how can i do this?
This is my code for add status
$insert_task = "INSERT INTO `tbl_task` (`intProjectid`,`intUserid`,`dtDate`,`dtFinishdate`,`varIssue`,`varStatus`,`varNeedhelp` )VALUES ('".$id."','".$userid."','".$dtdate."','".$dtfinish."','".$issue."','".$status."','".$help."');";
$insert_query=mysql_query($insert_task);
You didn’t give me anything but I’ve tried to implement something by guessing and hope if it doesn’t solve your problem but at least it will help you. Following code is for your ajax functionality, you can put it inside the head tag of your page between script tags-
And I guessed your form could be something like this
Put this inside your head or stylesheet (without style tag)
And your update.php file should be something like
I’ve tested it and working. The id I’ve used in the form is by assuming that you have id’s for each of your status and you should update instead of inserting to change the status. let me know if it helps or if you need more help, I’ll be on touch. Thanks!