a little help please

Discussion in 'PHP' started by Carey, Apr 30, 2007.

  1. #1
    {capture name="title"} - {l}Contact Us{/l}{/capture}
    {capture assign="in_page_title"}{l}Contact Us{/l}{/capture}
    {capture assign="description"}{l}Contact us with queries you might have.{/l}{/capture}
    {include file="header.tpl"}
    {include file="top_bar.tpl"}
    {include file="admin/messages.tpl"}
    
    {if $error}
    <div class="err">
    {l}There was a problem sending the email. Please try again later.{/l}
    Or send email to carey03@gmail.com.
    </div>
    
    
    
    {else}
    
    {if not $success}
    
    <form action="contact.php" method="post" name="contactform">
    <table border="0" cellspacing="10" cellpadding="2" class="formPage">
      <tr><td colspan="2"><h3>{$in_page_title}</h3></td><td>&nbsp;</td></tr>
      <tr> 
        <td valign="top" align="right">Full Name:</td>
        <td>
    	<input type="text" name="name" value="{$name}" id="name" size="40" maxlength="100" class="text" /><br />
      	{validate form="contact_form" id="v_name" message=$smarty.capture.field_char_required}
    	</td>
      </tr>
      <tr> 
        <td valign="top" align="right">Email Address:</td>
        <td>
      	<input type="text" name="email" value="{$email}" id="email" size="40" maxlength="100" class="text" /><br />
      	{validate form="contact_form" id="v_email" message=$smarty.capture.invalid_email}
    	
    	</td>
      </tr>
      <tr> 
        <td valign="top" align="right">Contact Reason:</td>
        <td>
    	
    			<select name="reason">
    			<option selected="selected"> - - select a contact reason - - </option>
    			<option value="advertising" label="advertising">Advertising Inquiry</option>
    			<option value="general" label="general">General Inquiry</option>
    			<option value="suggestion" label="category">New Category Suggestion</option>
    			<option value="other" label="other">Other (please specify)</option>
    			<option value="report" label="problem">Reporting a Problem</option>
    			<option value="feedback" label="feedback">Website Feedback</option>
    		</select>
    		{validate form="contact_form" id="v_reason" message=$smarty.capture.no_contact_reason}
    	
    	
    	</td>
      </tr>
      <tr> 
        <td valign="top" align="right">Message:</td>
        <td>
    	<textarea name="message" id="message" rows="5" cols="32" class="textarea">{$message}</textarea><br />
    	{validate form="contact_form" id="v_message" message=$smarty.capture.field_char_required}
    	</td>
      </tr>
      <tr> 
        <td>&nbsp;</td>
        <td><input type="submit" name="submit" value="Continue" /></td>
      </tr>
    </table>
    </form>
    
    
    {else}
    <div class="msg">
    {l}Thank You, Your email has been sent.{/l}
    </div>
    
    
      {/if}
    {/if}{include file="footer.tpl"}
    Code (markup):
    This script isn't working for some reason. It says the error msg everytime.

    I want it to send to
     
    Carey, Apr 30, 2007 IP
  2. commandos

    commandos Notable Member

    Messages:
    3,648
    Likes Received:
    329
    Best Answers:
    0
    Trophy Points:
    280
    #2
    is that smarty template ?

    what is the message error ?
     
    commandos, Apr 30, 2007 IP
  3. Carey

    Carey Active Member

    Messages:
    370
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    80
    #3
    There was a problem sending the email. Please try again later. <<that's the error.

    I'm pretty sure it's a smarty template.
     
    Carey, Apr 30, 2007 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    The code you posted is the template, and it has nothing to do with the error. You will need to post your PHP script.
     
    nico_swd, May 1, 2007 IP
  5. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Please post the error you are getting because reading this script it is quite time consuming to find out the error. :)
     
    Subikar, May 1, 2007 IP
  6. Carey

    Carey Active Member

    Messages:
    370
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    80
    #6
    When I push submit.. it gives the error msg that it should.. but there shouldn't ALWAYS be an error.
     
    Carey, May 1, 2007 IP
  7. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #7
    That doesn't help us, mate. Post your code. We can't do anything without it.
     
    nico_swd, May 1, 2007 IP