salve,
devo realizzare la classica paginetta per il recupero password.
ma il codice, ha qualcosa che non va, visto che le email non arrivano.
poi volevo cheidervi, eventuali misure di sicurezza da aggiungere, tipo email criptate.
un aiuto, grassssie!!!
Codice:
<?php require('Connections/xxx.php'); ?>
<?php
mysql_select_db($database_gcv, $gcv);
$query_Recordset1 = "SELECT password FROM `user` WHERE username = '$_POST[username]'";
$Recordset1 = mysql_query($query_Recordset1, $gcv) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_gcv, $gcv);
$query_Recordset2 = "SELECT email FROM `user` WHERE username = '$_POST[username]'";
$Recordset2 = mysql_query($query_Recordset2, $gcv) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
//varie info per email
$oggi = date("j F Y G:i");
$ip = "$_SERVER[REMOTE_ADDR]";
$soggetto = "pass";
$to ="$Recordset2"
$body = "Ecco i tuoi dati: \nPassword: $Recordset1 \nUsername: $_POST[username]";
mail("$to","$soggetto","$body");
header ("Location: http://xxxxxxx.com/successo.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento senza titolo</title>
</head>
<body>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($Recordset2);
?> | | | |
| | xhtml | E' un linguaggio markup associante proprietà di XML con caratteristiche di HTML. | | |
| | | |
| | | |
| | IP | Indirizzo numerico che identifica ogni computer collegato a Internet in maniera univoca | | |
| | | |
| | | |
| | HTML | HTML (HyperText Markup Language) nasce per mano di Tim Berners-Lee, il costruttore del primo webserver e del primo browser, come estensione di SGML (Standard Generalized Markup Language) nel 1990. | | |
| | | |
| | | |
| | W3C | World Wide Web Consortium | | |
| | | |
| | | |
| | PHP | E' una piattaforma trasversale lato server scripting language utilizzata per la creazione di pagine web dinamiche | | |
| | | |
| | | |
| | Mysql_query | mysql_query è una funzione MySql che invia una query al database associato alla connessione specificata. | | |
| | | |
| | | |
| | Mysql_error | mysql_error è una funzione che restituisce il testo del messaggio di errore dell'ultima istruzione MySQL eseguita utilizzando, se specificato, l'identificativo di connessione passato come argomento. | | |
| | | |
| | | |
| | Mysql_select_db | mysql_select_db è una funzione che permette di selezionare il Database ove andremo a lavorare utilizzando l'identificativo di connessione $connessione specificato | | |
| | | |