i am getting SQL syntax error for long paragraph but same code is working fine for short line text. i have attached screen shot of error.!
below is my insert query code. waiting for your response.
<?php
include('config.php');
if(isset($_POST['add']))
{
echo $name=$_POST['name'];
$description=$_POST['description'];
$status=$_POST['status'];
$image=$_FILES['image']['name'];
if(isset($_FILES['image']['name']))
{
move_uploaded_file($_FILES['image']['tmp_name'],"gallery_files//".$_FILES['image']['name']);
echo $image=$_FILES['image']['name'];
}
echo $sql="INSERT INTO test(name,description,image,status)VALUES('$name','$description','$image','$status')";
$r=mysql_query($sql) or die(mysql_error());
echo "<script>window.location = 'product.php'</script>";
}
?>