Hola El Patrón, gracias por la respuesta, funciona de maravillas. Le hice unos cambios y quedo asi.
Código PHP:
<?php /*empieza formulario*/
if($Submit){
@$Nombre = $_POST['Nombre'];
@$Email = $_POST['Email'];
@$Consulta = $_POST['Consulta'];
@$clid = $_POST['clid'];
mysql_query("update clientes set consultas=consultas+1 where clid='$clid'");
$result = mysql_query("select vid from visitantes where mail = '$Email'");
$results = mysql_num_rows($result);
if ($results>0) {
mysql_query("update visitantes set contactos=contactos+1 where mail='$Email'");
} else {
mysql_query("insert into visitantes values (NULL, '$Nombre', '$Email', 1)");
}
$result = mysql_query("select mail, cliente from clientes where clid = '$clid'");
list($receptor) = mysql_fetch_array($result);
$header = "From: $Nombre <$Email>\n";
$header .= "To: ".$receptor."\n";
$header .= "X-Mailer: PHP4\n"; //mailer
$header .= "MIME-Version: 1.0\n";
$header .= "Reply-to: ".$Email."\n";
$header .= "Content-type: text/html; charset=iso-8859-1\n";
//************************************************************************/
$cuerpo = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html><head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
</head>
<body>
<tr>
<td bgcolor='#fea941' align='left' valign='top'>" . $Nombre . " envía una consulta desde MiSitio.com.ar
<br>Nombre: " . $Nombre . "
<br><a href='mailto: " . $Email . "'> " . $Email . "</a>
<br>Consulta: " . $Consulta . "
</td></tr></body></html>";
mail($receptor,'Visitante de MiSitio.com.ar',$cuerpo,$header);
echo "<table width='383' height='200' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td align='center' valign='middle'>Su consulta ha sido enviada, gracias<br>
<a href='ver.php?clid=$clid&cliente=$cliente' class='listado'>volver</a></td>
</tr>
</table>";
}
else{ //se manda// ?>
<form action="ver.php?clid=<? echo $clid; ?>&cliente=<? echo $cliente; ?>" method="post" name="form1" target="_self" onSubmit="MM_validateForm('Nombre','','R','Email','','RisEmail','consulta','','R');return document.MM_returnValue">
<table width="383" height="250" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top">
<table width="383" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FEA941">
<tr>
<td align="left" valign="middle" bgcolor="#FEA941" class="fecha">Enviar
una consulta a<strong> <?php echo $cliente; ?></strong></td>
</tr>
</table>
<table width="360" height="0" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="271" align="left" valign="top" class="texto2"><input name="clid" type="hidden" value="<?php echo $clid; ?>">
</td>
</tr>
</table>
<table width="360" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="middle" class="opcion">Nombre<br>
<input name="Nombre" type="text" id="Nombre2" size="40" style="width:360px" class="formularios"></td>
</tr>
</table>
<table width="360" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="240" align="left" valign="middle" class="opcion">E-mail<br>
<input name="Email" type="text" id="Email2" size="40" style="width:360px" class="formularios"></td>
</tr>
</table>
<table width="360" height="60" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="middle" class="opcion">Consulta<br>
<textarea name="Consulta" cols="40" rows="5" id="textarea" style="width:360px" class="formularios"></textarea></td>
</tr>
</table>
<table width="360" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><input type="submit" name="Submit" value="Enviar" class="bt-form">
<input type="reset" name="Submit2" value="Borrar" class="bt-form"></td>
</tr>
</table></td>
</tr>
</table>
</form>
<? }
//fin del formulario//?>
Lo pongo por si alguien lo necesita.
Muchas gracias
Saludos