I'm creating a form that has a text area that uses TinyMCE.
When the form is submitted, the form sends the information using POST to a PHP script.
In that PHP, I'm trying to store the information from the TinyMCE in a database using MeekroDB.
The thing is that MeekroDB is storing my HTML from TinyMCE this way:
Is there any way of storing normal HTML?
This is my code:
DB::query("INSERT INTO products (title, price, article_nr, description, adicional_info, active, sold)
VALUES (%s, %s, %s, %s, %s, %s, %s)",
$query_data['title'],
$query_data['price'],
$query_data['article_nr'],
$query_data['description'],
$query_data['adicional_info'],
$query_data['active'],
$query_data['sold']
)
Already tried this way:
DB::query("INSERT INTO products (title, price, article_nr, description, adicional_info, active, sold)
VALUES (%s, %s, %s, %l, %l, %s, %s)",
$query_data['title'],
$query_data['price'],
$query_data['article_nr'],
$query_data['description'],
$query_data['adicional_info'],
$query_data['active'],
$query_data['sold']
)
but it returns an error.
Hello @Alexandre Cristo,
Meekrodb is one of the good mysql library for php. I have started my work with meekrodb just before a month.
So your answer is :
You can do by following query in #meekrodb.
So this is the solution for html source insert into db using meekrodb library. I have done it many times for html source insert into database.