generalsagar Posted February 11, 2012 Share Posted February 11, 2012 <html> <head> <script type="text/javascript" src="scriptaculous/lib/prototype.js"></script> <script type="text/javascript" src="scriptaculous/src/scriptaculous.js"></script> <script type="text/javascript"> function load_auto(){ new Ajax.InPlaceEditor( "name", 'update.php' ); new Ajax.InPlaceEditor( "email", 'update.php' ); } </script> </head> <body onLoad="javascript:load_auto();"> <?php mysql_connect("localhost", "root", ""); mysql_select_db("inplacewhile"); $sql ="SELECT * FROM basicinfo"; $res = mysql_query($sql); $count = mysql_affected_rows(); if($count>0) { while($row = mysql_fetch_array($res)) { echo '<div id="name">'; echo $row[2]; echo '</div>'; echo '<div id="email">'; echo $row[3]; echo '</div>'; } } else { echo "unable to update"; } ?> </body> </html> Here i'm trying to use Ajax Inplace edit function. I have echoed rows from the database in a while loop. But this ajax inplace editor is taking only the first one. Take a look at the attached photo. Please help. Link to comment https://forums.phpfreaks.com/topic/256871-ajaxinplaceeditor-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.