<?php
if(isset($_POST["send"]))
{
	$name = $_POST["name"];
	
	$email = $_POST["email"];
	
	$msg = $_POST["msg"];
echo(" Hello!<br />");

	if(empty($name))
	{
	echo(" - There was no name!<br />");
	}

	
	if(empty($msg))
	{
		echo(" - There was no message!<br />");
	}
// IF THEIR ARE NOT EMPTY
	if(!empty($name) && !empty($email)  && !empty($msg))
	{
		//code for email 
	
	} 
}
 ?>

<form id="form" action="" enctype="multipart/form-data" method="post">
								<div class="column1">
									<div class="row">
										<input type="text" class="input" value="Name:" name="name"/>
									</div>
									<div class="row">
										<input type="text" class="input" value="E-mail:" name="email" />
									</div>
									<div class="row">
										<input type="text" class="input" value="Phone:" name="phone"/>
									</div>
									
								</div>
								<div class="column1">
									<div class="">
										<textarea cols="30" rows="2" name="msg">Message:</textarea><br />
										<div class="div">
									<input type="image" src="images/cler1.jpg" name="send" />&nbsp; <input type="image" src="images/cler2.jpg" />
										</div>
									</div>
								</div>
								<div class="clear"></div>
							</form>

When i click on image to send not getting a simple echo message
how to do that??

When you are submitting the form are you deliberately not filling out a form to check if the error comes through, or are you filling the form out all the way and have an echo message in your mail script that isn't showing up?

Something you could try is making another div box in your page. Then insert a php script kinda like this in the box:

<?
if(isset($yourEcho))
{
echo $yourEcho;
}
?>

and change the if statements in your main code to this:

if(empty($variable))
{
$yourEcho = "No variable set";
}
This article has been dead for over six months. Start a new discussion instead.