There you go mysqli with prepared statements procedural.
I didn’t made any special edit to tell_a_friend.php because its only mail() function in and nothing special, and i leave to you dynamic_dropdown_options_from_mysql.php example so you can implement in what you need for.
test.zip (8.6 KB)
As i told you i’m short with time, but it’s tested and working.