HTML
  Home arrow HTML arrow Page 4 - Submitting a Form Using an Image Tag
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

Submitting a Form Using an Image Tag
By: Chris Root
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 18
    2005-04-18

    Table of Contents:
  • Submitting a Form Using an Image Tag
  • Submitting a Form
  • Processing the Form
  • The Server Side Code
  • GD Methods
  • Handling the Name
  • The TextBox Class
  • From the Top

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Submitting a Form Using an Image Tag - The Server Side Code


    (Page 4 of 8 )

    Our example will use PHP, but as mentioned before, there are many server platforms able to generate graphics. The basic idea will be the same.

    In PHP, there are several options for generating graphics. The GD library is the most popular, and is built into most PHP distributions. Solutions based on the Image Magic and Freeimage libraries are also available. In this example we will be using GD.

    The goal here is to provide a friendly notice that the user's entry to the contest has been processed. Unfortunately, assembling a complete image programmatically is not fun and doesn't always give the best results.

    Fortunately, GD allows us to layer text on top of an existing image. All that is needed is to produce an image that is the same size as the image initially loaded in the page by using a graphics application.

    Most people like to see their name on things, so the best course of action for this project is to create a graphic that has space for the name from the form.

    One limitation that GD has for which we need a work around is that there is currently no way to center or right align text. The major portion of the server side code in this project is intended to adjust display of the text programmatically rather than through the existing API.

    More HTML Articles
    More By Chris Root


       · That needs JavaScript to submit a form?At least have a server side validation and...
       · I specifically left validation up to the reader as validation is a topic all by...
       · Accessibility means that you make sure anyone can use the application regardless of...
       · I did not mean to imply that I ignore accessibility in my real projects. I always...
       · I've been using a hidden IFrame to handle form submissions - the web page shunts all...
       · For 'Anonymous Loozah #1'there are many ways to submit forms on the web... some...
     

    HTML ARTICLES

    - Using a 3D HTML Table as a Recordset
    - Building a 3D HTML Table
    - Maximizing and Restoring HTML Images: Layer ...
    - Completing Construction of a Database Form w...
    - Maximizing and Restoring Images in a Tabular...
    - Building the Recordset for an HTML Database ...
    - Laying Out a Database Form with HTML
    - Tabular Database Form Functions with HTML
    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT