Do not enter data into a MySQL table?

There is a field where the user enters the data, there is a button that sends this data in $_GET, then from $_GET data is in the database, but is recorded to the database only numbers, and the desired rows in the database type - text.

Form code:
echo "<input type=text name=question>";

Code of sending:
$question_text = $_GET['question'];
mysqli_query($link, 'INSERT INTO `html_questions` (question_id, question_text) VALUES ('.$i_question_id.', '.$question_text.')');


Need to bring $question_text

Enter the numbers

5ccc27df7ab10449177822.png
Database

5ccc27f118385741949194.png
The letters you typed

5ccc2842d82b7269513892.png
Database

5ccc285288b10837790208.png

Nothing has changed.

PHP module for Joomla.
March 20th 20 at 11:37
1 answer
March 20th 20 at 11:39
Solution
Text values in SQL query must be wrapped in quotation marks.

Or better yet, take the tutorial and learn what prepared queries and sql injection. Your code - carpet, inviting hackers to hack the site.
Thank you, you helped me a lot, necessarily familiar with the material that you sent. - moshe71 commented on March 20th 20 at 11:42

Find more questions by tags PHPMySQLJoomla