at the same time as they are editing the text.
uploader form + text input to edit a text you can insert the two form into one big form.
<form target="_blank" method="post" enctype="multipart/form-data">
<table width="350" border="0" cellpadding="1" cellspacing="1" >
<tr>
<td width="246"><input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
<input name="usertext" type="text" id="usertext" />
<input name="userfile" type="file" id="userfile" />
</td>
<td width="80"><input name="upload" type="submit" class="box" id="upload" value=" Upload " /></td>
</tr>
</table>
</form>
=>>>
you upload the image, and use the inserted $_POST["text"] to update the database. Or what ever you want to do with that text? you want to insert the text into the image? After you change the image, you can set an image header to output the image.
header('Content-Type: image/jpeg');
$img = LoadJpeg('imageyouwant.jpg');
imagejpeg($img);