it's not using GET to grab the text, the way you've got it coded:
<img src="midbar.php?text=testing" width="100%" height="25">
it's using it right from there as it is assigned.
try something in the way of the following for test.php:
<?php
// grab your variable from db here
$testing = "testing";
echo ("
<img src=\"midbar.php?text=$testing\" width=\"100%\" height=\"25%\">
");
?>
using % width however is going to stretch your text though, as it's now a part of the image, try locking the size in, say 25 height, and 200 width, and place it in a header table, in the far right cell of 3. then in the middle cell, give it a width of 1000 or something, and overall table width=100%. that may work to stretch it all the way out.
something like:
<!-- header row -->
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/shim.gif" width="1" height="25"></td>
<td width="3000"><img src="images/shim.gif" width="9" height="74" border="0"></td>
<td>
<?php
$testing = "testing";
echo ("
<img src=\"midbar.php?text=$testing\" width=\"200\" height=\"25\">
");
?>
</td>
</tr>
</table>
OR
use a 100% table width, a cell with a repeating background image, and just your $testing in the cell using regular old font maybe better? no need for GD then...
hth.