Form capture problems !

Hi All

The title doesn't best describe my problem but I can't think of a better way so I'll just explain.

I have a simplified version of what I'm working with here.

It's a font tester where you can select text and font size from the drop menus and it will be set below in a given font. The values are captured with jQuery and the image is produced with the PHP GD library but thats all working.

My problem is I want to use the input text area and the text drop down menu to set the text that is used.

If text is typed into the text area I would like that to used. If text is selected from the drop down I would like that to be used.

Hope this makes sense and someone can help. Any help would be greatly appreciated.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="" xml:lang="en" lang="en">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <meta name="robots" content="noindex, nofollow" />
	<style type="text/css" media="screen">
	 form{margin:0 0 20px 0;}

  <div id="content">
    <form method="" action="" id="testerForm">
      <input id="inputText" type="text" name="text" value="" />
      <select name="text" id="selectText">
        <option value="">Text</option>
        <option rendertype="o">0123456789</option>
        <option rendertype="o">The quick brown fox jumps over the lazy dog</option>
        <option rendertype="o">Fjord Nymphs XV beg quick waltz</option>
        <option rendertype="o">J.Q. Vandz struck my big fox whelp</option>
      <select name="size" id="selectSize">
        <option value="">Size</option>
        <option value="40">40</option>
        <option value="60">60</option>
        <option value="84">84</option>
        <option value="108">108</option>
      <input type="submit" name="submit" id="set" value="Set" /> 
    <div class="fontTester">
  </div><!-- #content -->

  <script src=""></script>
  <script type="text/javascript" charset="utf-8">
    var text = 'Test'; 
    var size = 70;
    var font = 'corbelb.ttf';
    var dataString = 'text=' + text + '&size=' + size + '&font=' + font;
    $(".fontTester").html("<img src='sample.php?" + dataString + "' />");
      if($('#inputText').val() != ''){
        text = $('#inputText').val();
      if($('#selectText').val() != '' ){
        text = $('#selectText').val();

  		if($('#selectSize').val() != ''){
  			size = $('#selectSize').val();

      dataString = 'text=' + text + '&size=' + size + '&font=' + font;
      $(".fontTester").html("<img src='sample.php?" + dataString + "' />");