Hola como andas!!, muchas gracias por tu ayuda!
Segui tu consejo, y con el link que me diste arme el formulario... pero ahora lo subi al servidor para probarlo.. y cuando completo todo el formulario y lo envio, me dice "Server Problems, try again later".... y no encuentro cual es el error y el motivo por cual me dice eso...
este es mi nuevo codigo php:
Código:
<?php
if(isset($_POST["names"]) && isset($_POST["email"]) isset($_POST["company"])
isset($_POST["phone"]) isset($_POST["address"]) isset($_POST["city"])
isset($_POST["states"]) isset($_POST["zip"]) isset($_POST["menssages"])){
$fecha = date("d-M-y H:i");
$mymail = "ACA PUSE MI MAIL";
$subject = "Web JOT Law";
$contenido = $names." Name:\n";
$contenido = $email." Email:\n";
$contenido = $company." Company:\n";
$contenido = $phone." Phone:\n";
$contenido = $address." Address:\n";
$contenido = $states." State:\n";
$contenido = $city." City:\n";
$contenido = $zip." Zip:\n";
$contenido .= $message."Message:\n\n";
$contenido .= "the message wa sent on ".$fecha;
$header = "From:".$email."\nReply-To:".$email."\n";
$header .= "X-Mailer:PHP/".phpversion()."\n";
$header .= "Mime-Version: 1.0\n";
$header .= "Content-Type: text/plain";
mail($mymail, $subject, utf8_decode($contenido) ,$header);
echo "&estatus=ok&";
}
?>
y este es el codigo q puse en el FLA:
Código:
enviar = function () {
if (email.text.length && names.length && company.length && phone.length && address.length && city.length && states.length && zip.length && messages.length) {
if (email.text.indexOf("@") != -1 && email.text.indexOf(".") != -1) {
form_lv = new LoadVars();
form_lv.Name = names.text;
form_lv.Email = email.text;
form_lv.Company = company.text;
form_lv.Phone = phone.text;
form_lv.Address = address.text;
form_lv.City = city.text;
form_lv.State = states.text;
form_lv.Zip = zip.text;
form_lv.Message = messages.text;
form_lv.sendAndLoad("http://www.midominio.com.ar/web_prueba/send.php", form_lv, "POST");
status_txt.text = "Sending message...";
names.text = "";
email.text = "";
company.text = "";
phone.text = "";
address.text = "";
city.text = "";
states.text = "";
zip.text = "";
form_lv.onLoad = function() {
if (this.estatus == "ok") {
status_txt.text = "Your message has been sent...";
names.text = "";
email.text = "";
company.text = "";
phone.text = "";
address.text = "";
city.text = "";
states.text = "";
zip.text = "";
} else {
status_txt.text = "Server problems, try again please";
}
};
} else {
status_txt.text = "Wrong email";
}
} else {
status_txt.text = "Please, fill in the form before sending"
}
};
enviar_btn.onRelease = enviar;
Espero tu respuesta, muchas gracias!