Click here to Skip to main content
15,891,745 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was able to do this with a regular textarea, using PHP explode:

PHP
if (isset($_GET["submitannouncements"]) == "GET")
{
    $arry=explode( "\r\n, $_GET['announcementtext']);

    for ($i = 0; $i < 5; $i++)
   {
       $sql = "UPDATE tblannounce SET content = '".addslashes($arry[$i])."' WHERE id = ".++$i;
       mysqli_query($conn, $sql);
   }
}


How can I possibly do this if I'm now using tinyMCE?
Posted
Comments
Richard Deeming 7-Oct-15 11:02am    
Your code is vulnerable to SQL Injection[^].

NEVER use string concatenation to build a SQL query. ALWAYS use a parameterized query.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900