Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802

    inserire gli otput allo script php per farlo interagire con flash

    ciao ragazzi ho bisognio un vostro aiuto dovrei inserire gli output a uno script per l iscrizione a la newsletter perche dovrei farlo interagire con flash mi date una mano? grazie
    posto lo script
    Codice PHP:
    <?php
    include_once("include/config.php");

    $adminaddress "info@marikwebdesigner.com";
    $siteaddress ="http://www.marikwebdesigner.com";
    $sitename "marikwebdesigner";

    error_reporting E_WARNING | ~ E_NOTICE ) ; 
    $CONFIG['expire'] = 60;
    $CONFIG['regexpire'] = 24//in ore

    $conn = @mysql_connect($CONFIG['host'], $CONFIG['user'], $CONFIG['pass']) or die("&error= Impossibile stabilire una connessione");
    @
    mysql_select_db($CONFIG['dbname']) or die("&error= Errore nel DB");


    $CONFIG['check_table'] = array(
    "name" => "check_global",
    "email" => "check_global"
    );
    function 
    check_email($value)
    {
    global 
    $CONFIG;

    $value trim($value);

    if ((
    $value == ""))
    {
    echo 
    "&error= Il campo non può essere lasciato vuoto";
    }
    else{
    $query = @mysql_query("SELECT id FROM mailing WHERE email='$value'")or die("&error= Errore nella query");


    if (@
    mysql_num_rows($query) != 0) return "&mess= Email già utilizzata";
    else return
    "OK";
    }
    }
    //--------------
    define('AUTH_LOGGED'99);
    define('AUTH_NOT_LOGGED'100);

    define('AUTH_USE_COOKIE'101);
    define('AUTH_USE_LINK'103);
    define('AUTH_INVALID_PARAMS'104);
    define('AUTH_LOGEDD_IN'105);
    define('AUTH_FAILED'106);

    define('REG_ERRORS'107);
    define('REG_SUCCESS'108);
    define('REG_FAILED'109);



    //No need to change anything below ...
    // Gets the date and time from your server
    $date date("d/m/Y H:i:s");

    // Gets the IP Address
    if ($_SERVER['REMOTE_ADDR'] == "")
    {
    $ip "no ip";
    }
    else
    {
    $ip gethostbyaddr($_SERVER['REMOTE_ADDR']);
    }

    // Gets the POST Headers - the Flash variables
    $action $_REQUEST['action'] ;
    $name $_REQUEST['name'] ;
    $email $_REQUEST['email'] ;
    //Process the form data!
    // and send the information collected in the Flash form to Your nominated email address

    if ($action == "send")
    {
    //Innanzitutto controlliamo la var.le name:
    $controllo check_email($email);

    if (
    $controllo != "OK")
    {
    echo 
    $controllo;

    //Qui potresti anche far visualizzare una cosa del genere:
    echo "&mess=
    <A HREF=\"http://www.marikweb.com/homeita/\">Ritorna alla registrazione</A>"
    ;
    }
    else
    {
    //Ora inseriamo i dati nel DB.
    //Ovviamente devi creare una tabella in cui inserire i dati ke passi con il post.


    $link_db mysql_connect($CONFIG['host'],$CONFIG['user'],$CONFIG['pass']);
    mysql_select_db($CONFIG['dbname']);
    $sql_insert "INSERT INTO mailing (name,email) VALUES ('$name','$email')";
    if (
    mysql_query($sql_insert))
    {
    echo 
    "&mess=  OK RIGA INSERITA  ";
    }
    else
    {
    die(
    mysql_error());
    }

    mysql_close($link_db);

    //A questo punto inviamo l'e-mail
    mail ("$adminaddress","informazioni",
    "L'utente: $name si è iscritto alla MailingList
    ------------------------------
    Name Utente: 
    $name
    EmailUtente: 
    $emailn
    ------------------------------

    Logged Info :
    ------------------------------
    Using: 
    {$_SERVER['HTTP_USER_AGENT']}
    Hostname: 
    $ip
    IP address: 
    {$_SERVER['REMOTE_ADDR']}
    Date/Time: 
    $date","FROM:$email) ;
     
    //This sends a confirmation to your visitor
    mail ("$email","Re:",
    "Salve $name,n
    Per confermare l'iscizione alla Newsletter Le basta cliccare sul link sottostante 
    $siteaddress/homeita/mailinglist/conferma.php?email=$email&name=$name

    Saluti dallo Staff di 
    $sitename     
    $siteaddress","FROM:$adminaddress") ;

    //Confirmation is sent back to the Flash form that the process is complete
    $sendresult "Thank you. You will receive a confirmation email shortly.";
    $send_answer "answer=";
    $send_answer .= rawurlencode($sendresult);
    echo 
    $send_answer;   
           
    }
    }
    //

    ?>

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802
    ragazzi buongiorno me la date una mano non riesco a dare gli outpt a questo script cosa devo fare

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.