Please can someone assist me. I have data stored in mySQL. If i want to allow the user to view this data (say his/her profile information), and at the same time, when it is displayed, it is editable to allow the user to change certain fields and then save.
Hope i make sense.

Thanks

Thanks for your reply. Will this work with mySQL and where will i put the SQL code?

Member Avatar

diafol

Your text should be generated by mysql in the first place. The inline editor box could have an 'onblur' attribute or 'lose focus' event (known as a 'callback') that calls a php script to update the DB. This is standard Ajax stuff through jQuery. I haven't used this script, but it should be straightforward. There may be a callback function included in the properties of the object.

In the script below we'll see how to use the mysql_query function to retrieve records or rows from our birthdays tableBy the way, if you have time please check Website Design Services

Thanks for your post. I think you forgot to include the script :)

Member Avatar

diafol

@ravzn

They are signature spammers. Their only function is to make you click links in their signatures or message body so that they get some kickback. Worse than scum.

Try to analyze this example.

$query = mysql_query("select * from tbl_name");
while($result=mysql_fetch_array($query))
{
$name = $result;
$age = $result;
$address = $result;
$gender = $result;
}

// now display the result into textbox to allow the user to edit
echo "<form action='save.php' method='post'>";
echo "<input type='text' name='name' value='$name'>";
echo "<input type='text' name='age' value='$age'>";
echo "<input type='text' name='address' value='$address'>";
echo "<input type='text' name='gender' value='$gender'>";
echo "<input type='submit' name='submit' value='Save Changes'>";
echo "</form>";