title: create an image and dialog box on same screen in php
body: <p>I'm trying to create an image and a dialog box together on one screen in php. I eventually want the dialog box to be able to control the image (such as showing more lines on the image). When I run the code it only shows the image, not the dialog box. I must be missing some extra code to make it work. Please help. Thankyou for any suggestions. </p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
      header('Content-type: image/png');
      $png_image = imagecreate(50, 50); 
      imagecolorallocate($png_image, 15, 142, 210);
      $black = imagecolorallocate($png_image, 0, 0, 0);
      imageline($png_image, 0, 0, 50, 50, $black);  
      imagepng($png_image);
      imagedestroy($png_image);   
  ?&gt;
  
  &lt;html&gt;
      &lt;form action="" method="post"&gt;
          Name:&lt;input type="text" id="name" name="name"/&gt;
          &lt;input type="submit" value="submit" name="submit"/&gt;
      &lt;/form&gt;
  &lt;/html&gt;
  </code></pre>