Jump to content

Recommended Posts

<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.

post-131623-13482403234189_thumb.jpg

Link to comment
https://forums.phpfreaks.com/topic/256871-ajaxinplaceeditor-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.