Need help with contact us Form

Discussion in 'HTML & Website Design' started by ali_ravians, Jan 30, 2012.

  1. #1
    Need help with the following code

    <form action=""http://www.mywebsite.com/cgi-sys/formmail.pl" method="post">
    	<input type="hidden" name="recipient" value="email@google.com">
        <input type="hidden" name="subject" value="FormMail E-Mail">
        <table width="440"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="204">
    	<strong>First name</strong>
    	<img src="images/spacer.gif" height="1" style="display:block ">
    	<input type="text" style="width:204px; height:20px; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#1F3E60 ">
    	<img src="images/spacer.gif" height="4" style="display:block ">	
    	<strong>Last name</strong>
    	<img src="images/spacer.gif" height="1" style="display:block ">
    	<input type="text" style="width:204px; height:20px; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#1F3E60 ">
    	<img src="images/spacer.gif" height="4" style="display:block ">	
    	<strong>E-mail</strong>
    	<img src="images/spacer.gif" height="1" style="display:block ">
    	<input type="text" style="width:204px; height:20px; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#1F3E60 ">
    
    	</td>
        <td width="32"><img src="images/spacer.gif" width="32"></td>
        <td width="204"><strong>Phone/Fax</strong>
    	<img src="images/spacer.gif" height="1" style="display:block ">
    	<input type="text" style="width:204px; height:20px; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#1F3E60 ">
    	<img src="images/spacer.gif" height="4" style="display:block ">	
    	<strong>Zip</strong>
    	<img src="images/spacer.gif" height="1" style="display:block ">
    	<input type="text" style="width:204px; height:20px; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#1F3E60 ">
    	<img src="images/spacer.gif" height="4" style="display:block ">	
    	<strong>Address</strong>
    	<img src="images/spacer.gif" height="1" style="display:block ">
    	<input type="text" style="width:204px; height:20px; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#1F3E60 "></td>
      </tr>
    </table>
    <img src="images/spacer.gif" height="4" style="display:block ">	
    	<strong>Message</strong>
    	<img src="images/spacer.gif" height="1" style="display:block ">
    	<textarea style="width:440px; height:119px; overflow:auto; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#1F3E60 "></textarea>
    	<div style="padding-top:7px " align="right">
    	<input type="reset" style="width:63px; height:20px; background-image:url(images/clear.jpg); border:0px none; cursor:hand; cursor:pointer " value="">
        <input type="submit" name:"submit" style="width:63px; height:20px; margin-left:24px; background-image:url(images/send.jpg); border:0px none; cursor:hand; cursor:pointer " value="">
    	<input type="hidden" name="redirect" value="http://GOOGLE.COM">
        </div>
        
        
    	</form>
    HTML:
    I am hosting my website at Hostgator. Don't know where i am getting it wrong. Any feedback would be appreciated.
     
    Solved! View solution.
    ali_ravians, Jan 30, 2012 IP
  2. #2
    you made a mistake in the first line with ""link" instead of "link"
     
    earnnet, Jan 31, 2012 IP
  3. ali_ravians

    ali_ravians Active Member

    Messages:
    133
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #3
    thanks .. corrected that but now it is sending blank emails .. got any idea about that !!
     
    ali_ravians, Jan 31, 2012 IP
  4. FizixRichard

    FizixRichard Peon

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    
    <input type="text" style="width:204px; height:20px; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#1F3E60 ">
    
    Code (markup):
    ^ is useless and incorrect

    
    <input type="text" name="forename" style="width:204px; height:20px; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#1F3E60 ">
    
    Code (markup):
    ^ note the name attribute, your perl script needs to pick up each field, for that the field needs a handle (the name attribute). The name itself will depend either on the perl script (what it expects them to be, if its a 3rd party script), if its self made, then you decide the name fields just make sure the perl script picks them up using the same name as defined in the name attribute.


    Even better, create your form input fields properly

    
    <input type="text" name="forename" size="20" maxlength="255" id="forename" taborder="1" />
    
    Code (markup):
    There are more attributes than that so its worth looking them up so you know what you want to include, keep the inline styles out, go in the CSS: input { style info } or use the class attribute in the <input> class="formfield" and then in the CSS: .formfield { style info }.


    Additionally, you dont use tables for layouts. Layouts are using DIV and SPAN HTML tags. The table tags are for tables (tabular data, like a table of chemical properties).
     
    FizixRichard, Jan 31, 2012 IP