Im using Scriptaculous' Ajax.InPlaceEditor and i have this :
But i dont no how to update the database in the ajax.php file i tried:Code:<span id="status"> <?php echo $usrd[status]; ?> </span> <script type="text/javascript"> <!-- new Ajax.InPlaceEditor('status', 'ajax.php'); --> </script>
But it didnt update nothing, any ideas?PHP Code:<?php
include("include/core.class.php");
//SQL QUERY
$dsql="UPDATE user SET status='".$usrd[status]."' WHERE id ='".$usrd[id]."'";
$dupdate=mysql_query($dsql) or die ("Couldn't Execute Command");
?>
EDIT: nvm worked it out, apparently it automatically sends a post with the variable $valueso i just done this
PHP Code:<?php
$value = $_POST['value'];
$dsql="UPDATE user SET status='".$value."' WHERE id ='".$usrd[id]."'";
$dupdate=mysql_query($dsql) or die ("Couldn't Execute Command");
echo $value;
?>





so i just done this
Reply With Quote


