MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
Moderators: Moderators
Page 1/3 1 2 3 > >|
Forum RSS feedReply
ciao mem mi puoi aiutare a trovare gli output
AuthorText
rocco.mo
Junior Member
Avatar

Posts: 82
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 01/10/2007 21:20
ciao mem mi puoi aiutare a trovare gli output
#post1985
ciao mem mi puoi aiutare a trovare gli output di uno script per l iscrizione alla mailinglist questo script invia le emeil sia a me per dirmi che un utente si e iscritto e a l utente in piu inserisce i dati nel db
che ne pensi di questo script ?

code


<?php
include_once("include/config.php");

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


$CONFIG['expire'] = 60;
$CONFIG['regexpire'] = 24; //in ore

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

$value = trim($value);

if (($value == ""))
{
echo"&error =<b>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);

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



//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 =<BR><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 <br/>";
}
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: $email
 
------------------------------

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,
 
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;

       
       
}
}//


?>

Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 4642
Contributes: 1949

Gender: _MALE_
Online: No
Date: 01/10/2007 21:30
ciao mem mi puoi aiutare a trovare gli output
#post1986
Scusami ma sono piuttosto occupato con il cms, forse faresti prima a chiedere sul forum di html.it
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 82
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 01/10/2007 21:35
ciao mem mi puoi aiutare a trovare gli output
#post1987
ciao scusa il dist ma se trovi un secondo ci dai un occhiata una domanda personale sei italiano ?
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 4642
Contributes: 1949

Gender: _MALE_
Online: No
Date: 01/10/2007 21:48
ciao mem mi puoi aiutare a trovare gli output
#post1988
No ma vivo in italia. Cmq appena troverò un pò di tempo lo farò
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 82
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 01/10/2007 21:54
ciao mem mi puoi aiutare a trovare gli output
#post1989
ma tu insegni anche?
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 4642
Contributes: 1949

Gender: _MALE_
Online: No
Date: 01/10/2007 22:42
Re: ciao mem mi puoi aiutare a trovare gli output
#post1990
quote
rocco.mo:
ma tu insegni anche?

Ho solo 23 anni Smile
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 82
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 01/10/2007 22:51
ciao mem mi puoi aiutare a trovare gli output
#post1991
hai solo 23 hanni pero
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 82
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 01/10/2007 22:54
ciao mem mi puoi aiutare a trovare gli output
#post1992
complimenti a solo 23 anni fai questi lavori cosi difficili
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 4642
Contributes: 1949

Gender: _MALE_
Online: No
Date: 01/10/2007 22:54
Re: ciao mem mi puoi aiutare a trovare gli output
#post1993
Ciao, ho fatto qualche piccola correzzione al codice. Teoricamente riceve i dati e li invia per email, praticamente non so, non ho testato Smile
Attachment: rocco.mo.php
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 82
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 01/10/2007 23:09
ciao mem mi puoi aiutare a trovare gli output
#post1994
grazie mem e come mai flash non lo conosci non ti piace? tu che ne pensi su flash?
Delete Edit Quote
 
Reply
Page 1/3 1 2 3 > >|
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.103.63.59

Username
Password
New files
MemHT Wiki
Friends
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo