Page 1 of 1

php tag issue? form not submitting successfully

Posted: Tue Feb 08, 2011 9:49 pm
by ronanski
Hi all,

CMS Made Simple 1.7 "Cape Verde"
Apache version 2.2.17
PHP version 5.2.15

I have a strange issue with an email signup form on contourtraining.com. I believe I have embedded the php properly on the page using {php} {/php} and changing the config file ... $config['use_smarty_php_tags'] = true;

The form does not submit the details entered nor redirect to the set up thank-you.html page. I cannot refresh the captcha on the page either.
When i place the form on a separate page - not inside a cms template - it works fine eg: http://www.contourtraining.com/html-contact-form2.php

My template code is as follows [page is http://wwwcontourtraining.com/index.php - newsletter signup form on left hand column below nav ]

Code: Select all

<form method="POST" name="contact_form" id="newsletter-form"
action="{php}echo htmlentities($_SERVER['PHP_SELF']); {/php}"> 
          	
<fieldset>
      
<label for='name'>
<input type="text" class="text" name="name" value='{php}echo htmlentities($name){/php}'/>
</label>

<label for='email'>
<input type="text" class="text" name="email" value='{php}echo htmlentities($visitor_email){/php}'/>
</label> 	
              
<img src="captcha_code_file.php?rand=<?php echo rand(); ?>" id='captchaimg' />
<small><a href='{literal}javascript: refreshCaptcha();{/literal}'>Refresh</a></small><br />
<label for='message'>
<input id="6_letters_code" class="text" name="6_letters_code" type="text" />
</label>

<input type="submit" value="Submit" name='submit' class="submit">

<div id='contact_form_errorloc' class='err'></div>

           
</fieldset>
          
</form>

Any ideas anyone?

Many thanks,

Ronan