Hi Cor,
Assuming you know enough php to set up the file for connecting to your database,
you can insert into your database with the following example.

function addDescription($id, $name, $description) {
        //Escape any data being inserted
        $id = mysql_real_escape_string($id);
        $name = mysql_real_escape_string($name);
        $description = mysql_real_escape_string($description);

$query = "INSERT INTO YOUR_TABLE_NAME_HERE VALUES ('".$id."','". $name."','".description."')";
        $_POST['VALUES'];

        $result = mysql_query($query, YOUR_CONNECTION) or die(mysql_error());
        return $result; //Returns true or false if error
}

HTH,
Best,

Karl


On Sep 5, 2011, at 2:04 PM, Cor wrote:

I have a editable datagrid which I fill from mySQL with PHP.
So far works good.

But when items are changed (edit, added, deleted), I want them to save the
data in my mySQL database.
My values are in this multi-dimensional indexed array, which elements all
contain a associative array:

myArray[i]["id"]
myArray[i]["name"]
myArray[i]["description"]

So, can anyone tell/show me a apropriate way to pass this to PHP and in the
php-file how to INSERT or UPDATE this to mySQL?

TIA!
Best regards,
Cor van Dooren


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to