Hi Guys
I'm working on a spreadsheet like web application using a bit of PHP, Ajax and MySQL. I have a spreadsheet that is reading off of a MySQL database.
Then I'am using this simple AJAX inline editor to edit the values in the spreadsheet and post them back up to the server. I can get the values to stay within the spreadsheet but they won't post up to the database.
There is an accompanying update.php file that is executed after the values on the spreadsheet have been updated. Here is my code:
<?php
$content = $_GET['content'];
$fieldname = $_GET['fieldname'];
echo stripslashes(strip_tags($_GET['content'],"<br><p><img><a><br /><strong><em>"));
$update1 = "INSERT INTO paceReport `$fieldname` VALUES $content";
$result = mysql_query($update1)
or die;
?>
Am I missing something in my code? Should I be using an UPDATE query instead of a INSERT query? Your help is greatly appreciated.
Thanks!