<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Protezione Sicura con password]]></title><description><![CDATA[<p dir="auto">Ragazzi vorrei sapere come posso proteggere una pagina con un user e una password?</p>
]]></description><link>https://dev.connect.gt/topic/23168/protezione-sicura-con-password</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 00:17:07 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/23168.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Dec 2006 19:10:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Protezione Sicura con password on Mon, 18 Dec 2006 10:49:08 GMT]]></title><description><![CDATA[<p dir="auto">Grazie mille sei stato bravissimo</p>
]]></description><link>https://dev.connect.gt/post/408165</link><guid isPermaLink="true">https://dev.connect.gt/post/408165</guid><dc:creator><![CDATA[kobrabytelab]]></dc:creator><pubDate>Mon, 18 Dec 2006 10:49:08 GMT</pubDate></item><item><title><![CDATA[Reply to Protezione Sicura con password on Sat, 16 Dec 2006 16:52:08 GMT]]></title><description><![CDATA[<p dir="auto">Hai percaso intenzione di far accedere utenti tipo un forum?<br />
Dovresti usare un database, con relative tabelle, e le sessioni , dove user e pass si confronteranno.<br />
Un piccolo esempio:<br />
// controllo che il pulsante logini, del form, sia stato premuto<br />
if (isset($_POST["login"]))<br />
{<br />
// controllo che i campi user e pass siano compilati<br />
if ((!$_POST['n_utente']) || ($_POST['n_utente'] =="") OR<br />
(!$_POST['pass']) || ($_POST['pass'] ==""))<br />
{<br />
echo "compilare_campi";<br />
}<br />
else<br />
{<br />
// PRENDO IL VALORE DI USER<br />
$n_utente = strip_tags($_POST["n_utente"]);<br />
// CRIPTO IL VALORE USER IN MD5<br />
$md5_utente = md5($n_utente);<br />
// PRENDO IL VALORE DI PASS<br />
$pass = strip_tags($_POST["pass"]);<br />
// CRIPTO IL VALORE PASS IN MD5<br />
$md5_pass = md5($pass);<br />
// AVVIO LA SESSIONE<br />
@session_start();<br />
$_SESSION['n_utente'] = $n_utente;<br />
$_SESSION['pass'] = $pass;</p>
<p dir="auto">if(!$HTTP_POST_VARS)<br />
{<br />
echo "non_hai_autorizzazione";<br />
}<br />
else<br />
{<br />
$sql = "SELECT * FROM tabella WHERE campo_user='$md5_utente' AND campo_pass='$md5_pass'";<br />
$risultato = mysql_query($sql,$conn);<br />
$selezione = mysql_fetch_object($risultato);<br />
}<br />
if(($md5_utente==($selezione-&gt;user)) AND ($md5_pass==($selezione-&gt;pass)))<br />
{<br />
echo "successo_accedi";<br />
}<br />
else<br />
{<br />
echo "no_possesso_codici_riprova";<br />
}<br />
mysql_close($conn);<br />
}<br />
}<br />
else<br />
{<br />
QUI SOTTO VA TUTTO IL CODICE, HTML O PHP, DEL FORM PER IL LOGIN ALL'AREA PROTETTA.<br />
} // CHIUDO ELSE<br />
RICORDA CHE AD OGNI FILE IN CUI CI SIA BISOGNO DI FARE IL LOGIN DEVI INSERIRE ALL'INIZIO DEL FILE IL CODICE PER LA SESSIONE APERTA CHE NEL NOSTRO CASO E':</p>
<p dir="auto">@session_start();<br />
if((!isset($_SESSION['n_utente'])) AND (!isset($_SESSION['pass'])))<br />
{<br />
echo $logo_datagame_home_altri;<br />
echo $identificati_da_qui_altri;<br />
}<br />
else<br />
{<br />
QUI TUTTO IL CODICE HTML O PHP<br />
} // CHIUDO ELSE</p>
<p dir="auto">PRESUPPONGO CHE PER L'ASSEGNAZIONE DELLO USER E PASSWORD CI SIA UN FORM IN CUI L'UTENTE SI REGISTRI E DOVE L'USER E LA PASS SCELTE DA QUEST'ULTIMO SIANO INSERITE NEL DB CON VALORE "MD5".</p>
<p dir="auto">Spero sia stato chiaro, ma per qualunque esigenza contattami.<br />
TI SALUTO</p>
]]></description><link>https://dev.connect.gt/post/408162</link><guid isPermaLink="true">https://dev.connect.gt/post/408162</guid><dc:creator><![CDATA[mikslap]]></dc:creator><pubDate>Sat, 16 Dec 2006 16:52:08 GMT</pubDate></item><item><title><![CDATA[Reply to Protezione Sicura con password on Thu, 14 Dec 2006 15:57:12 GMT]]></title><description><![CDATA[<p dir="auto">Hai provato a cercare in GG con parole chiave tipo queste?</p>
<pre><code>codice php per protezione password
</code></pre>
<p dir="auto">Valentino</p>
]]></description><link>https://dev.connect.gt/post/408161</link><guid isPermaLink="true">https://dev.connect.gt/post/408161</guid><dc:creator><![CDATA[lumpi]]></dc:creator><pubDate>Thu, 14 Dec 2006 15:57:12 GMT</pubDate></item><item><title><![CDATA[Reply to Protezione Sicura con password on Thu, 14 Dec 2006 14:18:30 GMT]]></title><description><![CDATA[<p dir="auto">Ragazzi perchè non mi volete aiutare?</p>
]]></description><link>https://dev.connect.gt/post/408163</link><guid isPermaLink="true">https://dev.connect.gt/post/408163</guid><dc:creator><![CDATA[kobrabytelab]]></dc:creator><pubDate>Thu, 14 Dec 2006 14:18:30 GMT</pubDate></item></channel></rss>