First, never insert input into a database with filter it first. It makes you vulnerable for an attack. You can read this article to get a better understanding. http://shiflett.org/articles/input-filtering
Second, it looks like you are wanting to update the data in the database (you are passing an id in). If this is the case, you will want to use UPDATE instead of INSERT. If you go to http://dev.mysql.com you can search to find how to use the UPDATE syntax. If you are still stuck after search it out, email me off the list and I'll try to help you through it. Richard Aureole wrote: > I'm using the jEditable plugin which can be found here: > > http://www.appelsiini.net/~tuupola/258/jeditable-in-place-editor-plugin-for-jquery/save.php > > The examples files for saving to a database use Pear DB and SQL Lite > or something... > > I've been trying to get it to work with MYSQL but so far I've had no > luck. > > Here is the code I have for save.php > > /////////////CODE > > <?php > require_once 'dbConnection.php'; > function getLastID() { > $id = mysql_fetch_row(mysql_query("SELECT LAST_INSERT_ID()", $this- > >> linkId)); >> > return $id[0]; > } > $query="INSERT INTO edits(id, token, value) > VALUES('$_POST[id]', '%s', '$_POST[value]')"; > if(!mysql_db_query($dbname,$query,$link_id)) die(mysql_error()); > (stripslashes($_POST['value'])); > $result = mysql_query($query); > usleep(2000); > print $_POST['value']; > ?> > > /////////////END CODE > > I really have no idea what I'm doing when it comes to PHP/MYSQL... > > Can anyone help me get it working? > > >