1. ¡OFERTA! con cupón "DIRVPS": hosting por $0,01 y también VPS Linux y Windows por $0,01 el primer mes por Interserver ← publi
    Descartar aviso
Descartar aviso
Al usar este sitio web, aceptas que nosotros y nuestros socios podamos establecer cookies para fines tales como personalizar el contenido y la publicidad. Más información.

formulario en flash conectados con php y mysql

Tema en 'Programación y Diseño Web' iniciado por jair, 17 Nov 2010.

  1. jair

    jair Nuevo usuario

    hola a todos, me pueden hechar la mano a hacer un formulario hecho en flash que se conectye a php y mysql...
     
  2.  
  3. egrueda

    egrueda Usuario activo

  4. jair

    jair Nuevo usuario

    muchas gracias por tu alluda la verdad es que ya he estado checando esa pagina que me dices pero no puedo dar con el clavo...
    ya pude hacer un formulario en dreamweaver pero ahora lo quiero hacer en flash pero como te digo no puedo dar con el clavo...
    mira tengo una plantilla de monster template es la numero 27307.templatemonster.com/category.php?tid=27307&search_words=-+Any+-&from_=-+Any+-&to=-+Any+-&type=&cat=&style=&author=
    aqui puedes mirarla de la que te digo... lo que necesito es modificar el formulario todo lo demas ya lo tengo.. espero me puedas ayudar..
     
  5. jair

    jair Nuevo usuario

    ayudaaaaaaaaaaa

    acabo de terminar una web hecha a través de una plantilla flash, y lo único que me falta es conseguir que el formulario de envío de correo funcione correctamente. El caso es que no sé que partes del código php tengo que modificar. El formulario consta de 3 cajas de texto, una para el "nombre", otra para el "email" y la otra para el "mensaje". Y luego 2 botones, RESET y SUBMIT.
     
  6. egrueda

    egrueda Usuario activo

    Ese formulario envía los datos a una página o un script, incluso puede que se los envíe a si mismo. ¿A qué url está enviando ahora mismo los datos ese formulario?
     
  7. jair

    jair Nuevo usuario

    Gracias por tu tiempo

    quiero que los datos me lleguen a mi correo esa es una opcion y la otra es que me lleguen a una base de datos
     
  8. jair

    jair Nuevo usuario

    El php de mi plantilla

    MIRA ESTO ES LO QUE TENGO DE LA PLANTILLA QUE ESTOY MODIFICANDO <?php
    //-----------------Getting data sent by flash---------------------
    foreach ($_POST as $key => $value){

    if ($key != 'mail_to' && $key != 'smtp_server' && $key != 'smtp_port' && $key != 'mail_from' && $key != 'mail_subject' && $key != 'plain_text'){

    $mail_body .= '<b>'.str_replace('_',' ',$key).'</b>:<br/>';

    $mail_body .= ''.stripslashes($value).'<br/>';
    }
    }
    //-----------------------------------------------------------------



    $message = '<html><body>'.$mail_body.'</body></html>'; // mail body

    //------------if plain text is set to true removing html tags------
    if ($_POST['plain_text']=='true') {

    $message = str_replace('<br/>',"\r\n", $message);

    $message = strip_tags($message);

    //------------------------------------------------------------------
    } else {
    //----otherwise composing message headers---------------------------
    $headers = 'MIME-Version: 1.0' . "\r\n";

    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    //------------------------------------------------------------------
    }

    //------------setting conf data-------------------------------------
    $to = $_POST['mail_to'];

    $from = $_POST['mail_from'];

    $subject = $_POST['mail_subject'];

    $smtp_server = $_POST['smtp_server'];

    $smtp_port = $_POST['smtp_port'];
    //------------------------------------------------------------------

    //---------setting header info--------------------------------------
    $headers .= 'To: '.$to. "\r\n";

    $headers .= 'From: Site visitor ' .$from. "\r\n";
    //------------------------------------------------------------------


    if (mail($to, $subject, $message, $headers)){ // sending mail

    print('&mail=1'); //succes

    } else {

    print('&mail=0');//failure

    }

    ?>
     
  9. egrueda

    egrueda Usuario activo

    Pero por lo que veo, ahí tienes todo lo necesario, ese es el script que recibe los datos y los envía por email, no necesitas programar nada más :)

    En el formulario de flash existe un campo llamado "mail_to" (puede que sea oculto), y ahí es donde va la dirección a la que te lo mandan.

    ¿Qué es lo que no te funciona?
     
  10. jair

    jair Nuevo usuario

    MIRA ESTO SON LAS INSTRUCCIONES QUE TENGO SUPUESTAMENTE QUE HACER, PERO NO SE DONDE LAS TENGO QUE HACER.... YO CREIA QUE LAS TENIA QUE HACER EN LA PARTE QUE TE MANDE PRIMERO...
    CHECA ESTO MEJOR....
    EN QUE PARTE TENGO QUE HACER LOS CAMBIOS, EN FLASH O DREAMWEAVER?


    TE CAMBIE LA LETRA DEL CORREO de emai..l por la I porque el sistema no me permitia mandar la palabra completa..


    <?xml version="1.0" encoding="utf-8"?>
    <!--
    Please read this information to learn how to set up the contact form integrated
    into the template.

    This readme file explains in details the meaning of the settings that can be
    done in the fcContactFormConfiguration.xml configuration file.

    It is recommended for you to use an XML editor to make changes to this file
    because it’s less possible to make an error in the markup which can cause to
    a not working contact form.
    -->
    <contactFormConfiguration>

    <!--
    An email address which will be used to receive messages from your contact form.
    You can specify several e-mail addresses separating them with a comma.
    For example: [Imail]first_email@domain.com[/Imail], [Imail]second_Imail@domain.com[/Imail], [Imail]third@domain.com[/Imail]
    -->
    <ImailTo>your_Imail@domain.com</ImailTo>

    <!--
    A server script type which will process sending Imails. It depends on your
    hosting and in the current version of the contact form it is allowed to use
    two types: php (Apache, PHP Hosting); asp (IIS web server, ASP).
    -->
    <serverProcessorType>php</serverProcessorType>

    <!--
    A name of the script file which process sending Imails on your server (without
    extension). The name contact is used by default.
    -->
    <serverProcessorFileName>contact</serverProcessorFileName>

    <!--
    Set whether to validate only required fields (true/false). The default value is
    true which means the not required fields of your contact form will not be validated.
    For example if the Imail field of your form is set as not required (imagine it)
    the form will be processed even if the user types in an incorrect Imail address.
    -->
    <validateRequiredOnly>false</validateRequiredOnly>

    <!--
    Set whether to submit the form when the Enter key is pressed even if the focus is
    not on the Submit button (true/false).
    -->
    <submitFormOnEnter>false</submitFormOnEnter>

    <!--
    Text showing to the user when the form is submitted without any errors.
    -->
    <messageSentText>Thank you for your message.</messageSentText>

    <!--
    Text showing in case the form is not submitted because of a server error.
    -->
    <messageSentFailedText>Thank you for your message.</messageSentFailedText>

    <!--
    Text your visitor will see while waiting till the processing is over.
    -->
    <formProcessingText>processing...</formProcessingText>

    <!--
    Your SMTP server (for ASP only).
    -->
    <smtpServer>localhost</smtpServer>

    <!--
    Your SMTP port (for ASP only).
    -->
    <smtpPort>25</smtpPort>

    <!--
    Set whether to send the message as a plain text (true) or as HTML (false).
    -->
    <plainText>false</plainText>

    <!--
    ID of the input field (in the structure XML file) to use for the “from: ”
    or email to use instead (for example: [Imail]mailfrom@domainname.com[/Imail]).
    -->
    <ImailFromSource>2</ImailFromSource>

    <!--
    Subject of the Imails that will be sent through this contact form or ID of
    the input field (in the structure XML file) to use for the “subject: ” label
    in your Imail client.
    -->
    <subjectSource>Contact Form from your site</subjectSource>

    <!--
    Validation error messages that are showing to the user when the form fails to
    validate. The form supports different types of validators. You can change the
    text of the error messages the validators produce here.

    You can use the {LABEL} keyword in these messages. It will replace it with the
    label value of the field where an error occurs.
    -->
    <validationErrorMessages>

    <!--
    A required field is not filled in.
    -->
    <message type="fieldIsRequired">{LABEL} is required.</message>

    <!--
    The specified Imail address is incorrect.
    -->
    <message type="emailNotValid">{LABEL} - is not valid Imail address.</message>

    <!--
    The specified number of characters in a field is less than a required minimum.
    -->
    <message type="minCharsLimitError">{LABEL} - The specified number of characters in a field is less than a required minimum.</message>

    <!--
    The specified string does not match with the regular expression.
    -->
    <message type="reqExpError">{LABEL} - The specified string does not match with the regular expression.</message>

    <!--
    The specified number is greater than an acceptable biggest number for this field.
    -->
    <message type="biggerThanMaxError">{LABEL} - The specified number is greater than an acceptable biggest number for this field.</message>

    <!--
    The specified number is lower than an acceptable lowest number for this field.
    -->
    <message type="lowerThanMinError">{LABEL} - The specified number is lower than an acceptable lowest number for this field.</message>

    <!--
    The data is not a number.
    -->
    <message type="notANumberError">{LABEL} - The data is not a number.</message>

    <!--
    The specified number must not be negative.
    -->
    <message type="negativeError">{LABEL} - The specified number must not be negative.</message>

    <!--
    The minimum number of variants is not selected
    -->
    <message type="minRequirementError">{LABEL} - The minimum number of variants is not selected</message>

    <!--
    The number of variants selected exceeds the maximum
    -->
    <message type="maxRequirementError">{LABEL} - The number of variants selected exceeds the maximum</message>

    <!--
    The fields that should be equal do not match
    -->
    <message type="shouldBeEqualError">{LABEL} - values do not match</message>

    <!--
    The date has wrong format.
    -->
    <message type="dateIsNotValidError">{LABEL} - date has wrong format</message>

    </validationErrorMessages>

    </contactFormConfiguration>
     
  11. egrueda

    egrueda Usuario activo

    Según eso, toda la configuración que necesitas está en el archivo llamado fcContactFormConfiguration.xml

    Abrelo con dreamweaver o con el bloc de notas, pero abrelo en vista de código, no de diseño, y cambia los parámetros que necesites. Todos los parámetros tienen una nota con la explicación, bastante sencillo.
     
  12. jair

    jair Nuevo usuario

    Que hariamos sin genios como ustedes

    ocea que es esta?


    <?xml version="1.0" encoding="utf-8"?>
    <!--
    Please read this information to learn how to set up the contact form integrated
    into the template.

    This readme file explains in details the meaning of the settings that can be
    done in the fcContactFormConfiguration.xml configuration file.

    It is recommended for you to use an XML editor to make changes to this file
    because it’s less possible to make an error in the markup which can cause to
    a not working contact form.
    -->
    <contactFormConfiguration>

    <!--
    An i-mail address which will be used to receive messages from your contact form.
    You can specify several i-mail addresses separating them with a comma.
    For example: [imail]first_imail@domain.com[/imail], [imail]second_imail@domain.com[/email], [imail]third@domain.com[/imail]
    -->
    <imailTo>your_imail@domain.com</imailTo>

    <!--
    A server script type which will process sending i-mails. It depends on your
    hosting and in the current version of the contact form it is allowed to use
    two types: php (Apache, PHP Hosting); asp (IIS web server, ASP).
    -->
    <serverProcessorType>php</serverProcessorType>

    <!--
    A name of the script file which process sending i-mails on your server (without
    extension). The name contact is used by default.
    -->
    <serverProcessorFileName>contact</serverProcessorFileName>

    <!--
    Set whether to validate only required fields (true/false). The default value is
    true which means the not required fields of your contact form will not be validated.
    For example if the i-mail field of your form is set as not required (imagine it)
    the form will be processed even if the user types in an incorrect i-mail address.
    -->
    <validateRequiredOnly>false</validateRequiredOnly>

    <!--
    Set whether to submit the form when the Enter key is pressed even if the focus is
    not on the Submit button (true/false).
    -->
    <submitFormOnEnter>false</submitFormOnEnter>

    <!--
    Text showing to the user when the form is submitted without any errors.
    -->
    <messageSentText>Thank you for your message.</messageSentText>

    <!--
    Text showing in case the form is not submitted because of a server error.
    -->
    <messageSentFailedText>Thank you for your message.</messageSentFailedText>

    <!--
    Text your visitor will see while waiting till the processing is over.
    -->
    <formProcessingText>processing...</formProcessingText>

    <!--
    Your SMTP server (for ASP only).
    -->
    <smtpServer>localhost</smtpServer>

    <!--
    Your SMTP port (for ASP only).
    -->
    <smtpPort>25</smtpPort>

    <!--
    Set whether to send the message as a plain text (true) or as HTML (false).
    -->
    <plainText>false</plainText>

    <!--
    ID of the input field (in the structure XML file) to use for the “from: ”
    or imail to use instead (for example: [imail]mailfrom@domainname.com[/imail]).
    -->
    <imailFromSource>2</imailFromSource>

    <!--
    Subject of the i-mails that will be sent through this contact form or ID of
    the input field (in the structure XML file) to use for the “subject: ” label
    in your i-mail client.
    -->
    <subjectSource>Contact Form from your site</subjectSource>

    <!--
    Validation error messages that are showing to the user when the form fails to
    validate. The form supports different types of validators. You can change the
    text of the error messages the validators produce here.

    You can use the {LABEL} keyword in these messages. It will replace it with the
    label value of the field where an error occurs.
    -->
    <validationErrorMessages>

    <!--
    A required field is not filled in.
    -->
    <message type="fieldIsRequired">{LABEL} is required.</message>

    <!--
    The specified i-mail address is incorrect.
    -->
    <message type="imailNotValid">{LABEL} - is not valid imail address.</message>

    <!--
    The specified number of characters in a field is less than a required minimum.
    -->
    <message type="minCharsLimitError">{LABEL} - The specified number of characters in a field is less than a required minimum.</message>

    <!--
    The specified string does not match with the regular expression.
    -->
    <message type="reqExpError">{LABEL} - The specified string does not match with the regular expression.</message>

    <!--
    The specified number is greater than an acceptable biggest number for this field.
    -->
    <message type="biggerThanMaxError">{LABEL} - The specified number is greater than an acceptable biggest number for this field.</message>

    <!--
    The specified number is lower than an acceptable lowest number for this field.
    -->
    <message type="lowerThanMinError">{LABEL} - The specified number is lower than an acceptable lowest number for this field.</message>

    <!--
    The data is not a number.
    -->
    <message type="notANumberError">{LABEL} - The data is not a number.</message>

    <!--
    The specified number must not be negative.
    -->
    <message type="negativeError">{LABEL} - The specified number must not be negative.</message>

    <!--
    The minimum number of variants is not selected
    -->
    <message type="minRequirementError">{LABEL} - The minimum number of variants is not selected</message>

    <!--
    The number of variants selected exceeds the maximum
    -->
    <message type="maxRequirementError">{LABEL} - The number of variants selected exceeds the maximum</message>

    <!--
    The fields that should be equal do not match
    -->
    <message type="shouldBeEqualError">{LABEL} - values do not match</message>

    <!--
    The date has wrong format.
    -->
    <message type="dateIsNotValidError">{LABEL} - date has wrong format</message>

    </validationErrorMessages>

    </contactFormConfiguration>
     
  13. egrueda

    egrueda Usuario activo

    Si, ese es el archivo fcContactFormConfiguration.xml
     
  14. jair

    jair Nuevo usuario

    Gracias

    Oye muchisimas gracias, la verdad que no se como pagartelo.. de hecho ya se por donde empezar, aunque me falta ponerlo a prueba verdad, lo estaba checando y algunas opciones se como cambiarlas y otras no,, pero te agradesco muchisimo, ahora me boy a poner a estudiar y practicar una de las partes mas faciles que me dejaste.. ya me estaba bolbiendo loco... por cierto me llamo Jair.. despues te cuento como me esta llendo con esto de mi formulario.....
     
  15. egrueda

    egrueda Usuario activo

    Pues te vienes un día por Madrid, así en un paseo, y me invitas a comer ;-)
     
  16. jair

    jair Nuevo usuario

    buenisima ides

    Siempre he tenido ganas de visitar espana, por cierto por que parte de madrid estas? y que tal esta por alla? si lo recomiiendas para visitar o no? aaa y te buscas un buen restaurante he porque no me pienso morir sin visitar y pagarte el favor...
     
  17. egrueda

    egrueda Usuario activo

    ¡Qué te voy a contar de Madrid, si me encanta! Si tú pagas la comida, yo pago las copas de después :) Hay mucho que ver y mucho que hacer en Madrid
     
  18. jair

    jair Nuevo usuario

    hola como has estado?

    hola, espero me recuerdes, te devo una comida... jajaja


    creo k ya ban a ser dos..
    para no hacertela tan larga necesito ayuda con esto.

    lo que esta de morado es lo que puse pero no sirve, quie estara mal...

    enlugar de info@produccionesmagic.com he intentado con magic441@hotmail.comque es mi correo.
    pero creo que en lo que fallo y no estoy seguro que este bien es en $emailAdddres

    bueno espero me puedas hechar la mano.. gracias
    <?php
    //Type the receiever's e-mail address
    $emailAddress = "info@produccionesmagic,com";
    //Type your Site Name
    $siteName = "htp;,produccionesmagic,com";

    $contact_name = $_POST['name'];
    $contact_email = $_POST['email'];
    $contact_subject = $_POST['subject'];
    $contact_message = $_POST['message'];

    if( $contact_name == true ) {
    $sender = $contact_email;
    $receiver = $emailAddress;
    $client_ip = $_SERVER['REMOTE_ADDR'];

    $email_body = "The Name Of The Sender: $contact_name \nEmail: $sender \n\nSubject: $contact_subject
    \n\nMessage: \n\n$contact_message \n\nIP ADDRESS: $client_ip \n\n$siteName";

    $emailAutoReply = "Hi $contact_name, \n\nWe have just received your E-Mail. We will get
    in touch in a few days. Thank you! \n\n$siteName ";

    $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
    $autoReply = "From: $receiver\r\n" . "Reply-To: $receiver \r\n" . "X-Mailer: PHP/" . phpversion();

    mail( $sender, "Auto Reply: $contact_subject", $emailAutoReply, $autoReply );

    if( mail( $receiver, "New E-Mail - $contact_subject", $email_body, $extra ) ) {
    echo "success=yes";
    } else {
    echo "success=no";
    }
    }
    ?>
     


Alojamiento web, Hosting Reseller, Servidores Dedicados - All in Hosting


    
    
    
    
Blog · Sitios amigos: GuiaHosting · Unidominios · Interalta ·