Large Text data not inserting into the Database

I am using this code but it is showing error. but when I just type just few lines then it is successful but when the matter text is 2 lines then it shows error. Why.?

I have tried changing the db row type to - TEXT , then Largetext. But still no change.

        $sql = "INSERT INTO scrolltext(title,description,adate) VALUES('$gtitle','$gdesc','$gdate')";
        
        $retval = mysqli_query($con,$sql);
        
        //echo $sql;
        
        if(! $retval ) {
            
      
           die('Could not enter data:' . mysqli_error());
        }
        
        echo '<img src="images/correct.png">',  "<b><font color='green'> Scrolling Text Saved Successfully\n </font></b>";
        
        
     }

?>

A little help will be nice.

Thanks

Why don’t you try to solve the error? Or at least tell us what error occured? Why don’t you post working code so someone can rely on the differences?

I hope for you that you sanitize your inputs, otherwise someone will just delete your database. Better use Prepared Statements

Sponsor our Newsletter | Privacy Policy | Terms of Service