Template selection from list

Allright, I have a bit of a problem, maybe someone can help me.

Say I have this php form on a page (im trying to send an email). It has an editable text box, name ‘message’ where I can type in the email.
However, I want to add underneath it a dropdown menu with different ‘template’ options - choosing one of these would ‘reload’ the page as it is except that the editable text box now contains the text (from mysql) that was selected from the drop down menu.

Heres the code as I have it now:

<form action="<?=$PHP_SELF?>" method="post" enctype="multipart/form-data">
		<textarea name="message" cols="50" rows="6" wrap="soft"></textarea>
<?	 if ($_SESSION[user][type] == "admin") {			 ?>
				<select name="select" size="1">
				 <option value="Template 1">Template 1</option>
				 <option value="Template 2">Template 2</option>
<?  }  ?>
		 <input class="inputsubmit" type="submit" value="Reply to Message">

I think i have to do a number of things, but I’m too much of a beginner with php to get them right it seems:

  1. Need to add a function in between “<textarea name=“message” cols=“50” rows=“6” wrap=“soft”>” and “</textarea>” that would check if the page just reloaded because one of the templates was ‘called’, and as a result it would display the adequate template text from mysql (this entire section is what I really cant seem to do)

  2. Maybe need to edit the template dropdown box to have it send the variables somewhere/to something?

Anyways, any sort of help/tip even a simple ‘cant be done mate’ would be well appreciated :slight_smile: