Ciao a tutti:
Mi sto picchiando da troppo tempo con questo codice per problemi di spam.
Ho deciso dunque di metterlo per adesso sono arrivato a questo punto:
<html>
<head>
<title>Log in</title>
</head>
<body><center>
Digita la password
</center>
<form method=post action = <?php print("$PHP_SELF"); ?>>
<div align="center">Pass:
<input type="text" size=6 name="password">
<input type="submit" name="send" value="Enter">
</div>
</FORM>
<?php
print ("$password");
print ("$pass");
if ($password == "pass")//change these to what ever you want them to be.
{
include ("filename.txt"); //your html txt file with full path goes in here!
}
else
{
if ($password == NULL)
{
}
else
print ("Sorry, $password is not a correct password.");//this is the error message, you can change it if you want.
}
?>
<center>
</body>
</html>
<?php
$name="PHP RANDOM PASSWORD GENERATOR";
$version="v1.5.0";
$company="TELEMATICS SOFTWARE";
/////////////////////////////////////////////////////////////////////////////
function randomPassword () {
$length ="6"; // the length of the password required
$possible = '23456789' .
'abcdefghijkmnpqrstuvwxyz' .
$str ="";
while (strlen($str) < $length) {
$str.=substr($possible, (rand() % strlen($possible)),1);
}
return($str);
}
////////////////////////// HTML SECTION ///////////////////////////////////
echo("<tr><td align=right bgcolor=#EDEDED>Your Random Password is: ");
$pass=("</td>".randomPassword()."");
echo("</td><td align=left bgcolor=#EDEDED>".$pass."");
/////////////////////// END HTML SECTION //////////////////////////////////
exit();
?>
solo che quando inserisco la password corretta automaticamente cambia a chiaramente mi dice è errata.
Come faccio a farla verificare prima di riaggiornarla?
E poi perche comunque sia i codici sono sempre gli stessi a catena e non sempre siversi?
Altra cosuccia mi piacerebbe che il codice sia come su:
http://forum.html.it/forum/register.php
come posso modificare quello che già ho?
Praticamente il tutto mi deve funzionare così:
se in codice è correto deve inviare la mail
altrimenti
mi scrive che il codice è errato e mi ritorna alla pagina precedente
grazzzzie davvero a chiunque mi possa aiutare...