[php, mysql] uploading several images via form

hey
im creating a simple html form with a text field where a user can insert text into a mysql database through php. this text will then be displayed on another page using php. no problem so far…

now, i want the user to ba able to insert images anywhere in the text. i was thinking about having the user first choose a file (using a browse button) then hit another button to insert the correct <img> tags in the text field of the form and saving the search path to the image file to variable at the same time.

so my questions are:

Is it possible to insert text (the <img> tags in this case) to a text field on a button click? and if so, without having any written text in that text field being erased?

And how would you browse for several files and either store these in variables or upload them to the server without hitting “submit” on the form?
(since the user should be able to keep writing after adding an image to the text…)

iv’e been searching like crazy but can’t find any useful info on this… so any help would be appreciated!
thank you