Ver Mensaje Individual
  #4 (permalink)  
Antiguo 28/01/2007, 21:56
trovadicto21
 
Fecha de Ingreso: marzo-2004
Ubicación: Tijuana, B.C.
Mensajes: 66
Antigüedad: 20 años, 1 mes
Puntos: 0
Sonrisa Re: Ayufa Con Formulario

Hola Dam.

Te pongo este codigo que a mi me ha funcionado perfectamente bien:

Primero el PHP, el cual se llama send.php:

Código PHP:
<?PHP

   $theName 
$HTTP_POST_VARS["theName"];
   
$theTel $HTTP_POST_VARS["theTel"];
   
$theEmail$HTTP_POST_VARS["theEmail"];
   
$theMessage $HTTP_POST_VARS["theMessage"];

$to "tu_mail@tu_server.com";
$subject "Contacto desde pagina web";
$message "Name: " $theName;
$message .= "\nTelefono: " $theTel;
$message .= "\nEmail: " $theEmail;
$message .= "\n\nMessage: " $theMessage;
$headers "From: $theEmail";
$headers .= "\nReply-To: $theEmail";

$sentOk mail($to,$subject,$message,$headers);

echo 
"sentOk=" $sentOk;

?>
Ahora el AS:
Código:
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
	if (theName.length<1) {
		mensaje_error = "Por, favor introduzca su nombre";
	} else if (theTel.length<1) {
		mensaje_error = "Por favor, introduzca un teléfono de contacto";
	} else if (theEmail.length<1) {
		mensaje_error = "Por favor, introduzca E-mail válido";
	} else {
		senderLoad.theName = theName.text;
		senderLoad.theTel = theTel.text;
		senderLoad.theEmail = theEmail.text;
		senderLoad.theMessage = theMessage.text;
		senderLoad.sendAndLoad("send.php", receiveLoad, "POST");
	}
};
receiveLoad.onLoad = function() {
	if (this.sentOk) {
		_root.gotoAndStop("success");
	} else {
		_root.gotoAndStop("failed");
	}
};
Espero que le entiendas al AS. Omiti el script de las condiciones para el mail y para el telefono, ya que es mucho codigo y te confundiria un poco. Si aun asi lo quieres, pidemelo y te lo paso. Espero que te sirva.

Salu2!
__________________
Que les Llueva Luz a todos!!