That error means that there is no row in the table order_table with a column id containing the $value.
This can be confirmed by running the below query replacing the $value with the expected integer.
SELECT COUNT(*) ct FROM order_table WHERE id = $value
A single row should be returned with a value of 0.
Once that is confirmed the solution is to reference a row that does exist or create the row in that table.
It is good though that you are using a foreign key. Otherwise, you would essentially have an orphaned row in the order details table.