mysqli

Order by With Union SQL

SELECT to_user_id AS sender_id FROM $chat_table_name WHERE( (to_user_id = $current_user_id OR from_user_id = $current_user_id) and post_id=$post_id) UNION SELECT from_user_id AS receiver_id FROM $chat_table_name WHERE( (from_user_id = $c…

how to insert php form to database mysqli

Here is my code and when i run them, they run without any error. However, the data i inputted is not inserted into the database. What I’m trying to do is to make a registration form and the data is then inserted and saved into the database…