I have this code in jquery:
$.ajax({
type: "POST",
url: "tosql.php",
data: {textnode: textnode},
success: function(){
alert( "Data Saved: " );
}
});
and this php script:
<?php
$textnode = $_POST['textnode'];
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("repository", $con);
mysql_query("INSERT INTO paragraphs (paragraphs) VALUES ('$textnode')");
mysql_close($con);
?>
When I go to mysql to view if the array was stored, I see “Array” as the value. What I’m trying to do is store each value in the array into its own row also. Serialize didn’t work in this case.
Edited: