Title: &#8220;send.php&#8221; error
Last modified: November 16, 2016

---

# “send.php” error

 *  Resolved [Leonardo T. Oliveira](https://wordpress.org/support/users/olivleonardo/)
 * (@olivleonardo)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/send-php-error/)
 * Hi.
 * I’m having trouble with a form contact page in my site. Here it is: [http://manhattanmassage.com.br/contato](http://manhattanmassage.com.br/contato).
 * It was filled with PHP code by the original designer, and curiously I think I’m
   not getting to use formcontact plugin because this code imposes itself:
 *     ```
       <?php get_header(); ?>
       <div id="whitebox">
   
       <div class="whiteleft">
       		<h2>Contato</h2>
       <?php $mensagem = $_GET['msg'];
       		if ($mensagem == "ok") {
       		echo '<span style="display:block; padding:5px; border:1px solid green; margin:15px 0; font-weight:bold;">Mensagem enviada com sucesso! Aguarde nosso retorno.</span>';
       		}
       		elseif ($mensagem == "doh") {
       		echo '<span style="display:block; padding:5px; border:1px solid red; margin:15px 0; font-weight:bold;">Ocorreu um erro ao enviar sua mensagem. Verifique se seu e-mail está escrito corretamente e se todos os campos estão preenchidos e tente novamente.</span>';
       		}
       	$randomum = rand(1,5);
       	$randdois = rand(1,5);
       	$randres = $randomum + $randdois;
       		 ?>
       		<form id='xc_contato' action='<?php bloginfo('template_url'); ?>/send.php' method='post' class='wpcf7-form'>
       		<input type="hidden" name="rrandres" id="rrandres" value="<?php echo $randres; ?>" />
       		<label for="nome">Seu nome</label><br />
       			<input type="text" name="nome" id="nome" /><br /><br />
       			<label for="email">Seu e-mail para contato</label><br />
       			<input type="text" name="email" id="email" /><br /><br />
       			<label for="mensagem">Mensagem</label><br />
       			<textarea name="mensagem" id="mensagem"></textarea><br /><br />
       			<label for="rrand">Quanto é <?php echo $randomum." mais ".$randdois; ?>?</label><br />
       			<input type="text" name="rrand" id="rrand" /><br /><br />
       			<input type="submit" id="enviar" value="enviar" />
       		</form><!-- form -->
       		<p>Atenção: Seu endereço de IP será usado para identificar sua mensagem.</p>
       	</div><!-- white left -->
       (...)
       	</div><!-- white right -->
       	<hr />
   
       </div><!-- whitebox -->
       <?php get_footer(); ?>
       ```
   
 * When somebody tries to fill the form and send a message, it leads to a non-existing/
   send.php page and nothing is sent.
 * Does anybody have any idea about what is going on?
 * Thank you very much!
 * Leonardo Oliveira

Viewing 1 replies (of 1 total)

 *  Thread Starter [Leonardo T. Oliveira](https://wordpress.org/support/users/olivleonardo/)
 * (@olivleonardo)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/send-php-error/#post-8444689)
 * Ok, it needed a
 *     ```
       <?php endwhile; ?>
       <?php endif; ?>	
       ```
   
 * at the end. And now I got to use “form contact 7” plugin putting
 * `<?php if (have_posts()) : while (have_posts()) : the_post(); ?>`
 * at the header and using the page I had with the plugin code.
 * \o/

Viewing 1 replies (of 1 total)

The topic ‘“send.php” error’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 1 participant
 * Last reply from: [Leonardo T. Oliveira](https://wordpress.org/support/users/olivleonardo/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/send-php-error/#post-8444689)
 * Status: resolved