<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.appelsiini.net/projects/jeditable/jquery.jeditable.js"></script>
<script type='text/javascript'>
$(document).ready(function(){
$('.edit').editable('save.php', {
id : 'name',
name : 'newvalue'
});
});
</script>
<ul>
<li>Name:- <div class="edit" id="name"><?php echo"$name"; ?></div></li>
<li>Surname:- <div class="edit" id="surname"><?php echo"$surname"; ?></div></li>
<li>Login ID:- <div class="edit" id="login"><?php echo"$login"; ?></div></li>
</ul>
newvalue=user edited content
id=elements id
This is my code for inline-editing values.
How to update columns in database,
- firstname
- lastname
- login
currently same value is inserted in all columns. How to insert values in appropriate columns? (Code for save.php required too.)
I am using this Edit In Place Plugin