Here is a sample code:
$query = "INSERT INTO $table SET category = '".$_POST['new_dish_category']."', name_of_dish = '".$_POST["new_dish_name"]."', discription = '".$_POST["new_dish_discription"]."', weight = '".$_POST["new_dish_weight"]."', price = '".$_POST["new_dish_price"]."'"; Question: why quotes are placed in such an image, I just can not understand? The first double is still clear, single for sql, and then what is the concatenation? After all, variables can be displayed in a string and just like that, like "tru-la-la $ my la la la". Explain, please, in more detail.
$myyou wrote$ny...... and you can see the variable and the line separately and the autocompet works. It looks scary, but nonetheless .... Although all these lines can be written down in different ways, for example, throughsprintfand then it will be more beautiful ........ but in general in queries now prepared variables are used for a long time ... So what is hard to get in modern times - Alexey Shimansky