I need an event to occur that when the text of $name is changed the new value of $name is updated into the database. I've looked at examples online but can't find any that use PHP which I'm planning on using to create the SQL statement in the database.
I've tried using the solution found here to even get a console.log printing but doesn't seem to be triggering for me. trigger an event when contenteditable is changed
Only part of the link is allowed to be changed hence why I'm using an inner span tag.
<a href='/tool/model/viewPackage.php?packageId=".$row_prim['id']."&prim=" . $prim ."'>" . $component_name . " " . "<span class='changeable' contenteditable='true' style='white-space:nowrap'>" . $name . "</span></a>";