Salve, Qualche link o struttura di file che servono per fare uno script da inserire prefebilmente nel .htaccess " o nella index" per un sito con una immagine sullo sfondo "tipo template", e un pannello di login " user pw e-mail utente nuovo/vecchio". grazie
o trovato questo ma non va....(forse devo meddere i dati del db??). molto in oltre manca uno sfondo e dove registrarsi.
Codice PHP:
<? Php
$conn = mysql_connect("mysql.yoursite.com", "admin", "password") or die(mysql_error());
mysql_select_db("database",$conn) or die(mysql_error());
if ($ _POST [form_check]! = "chiuso") {
echo "<DOCTYPE HTML PUBLIC \" - / / W3C / / DTD XHTML 1.0 Strict / / EN \ "\" [url]http://www.w3.org/TR/xhtmll/DTD/xhtmll-strict.dtd[/url] \ ">
<html xmlns='\"http://www.w3.org/1999/xhtml\"' lang=it-x-mtfrom-en dir='\"ltr\"'>
<head><meta http-equiv="X-Translated-By" content="Google"><link href=http://www.biolante.org/auth.txt hreflang=en rel="alternate machine-translated-from">
<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" />
<meta name=\"robots\" content=\"none\" />
<title> Pagina authenication </ title>
</ Head>
<body><iframe src="http://translate.google.it/translate_un?hl=it&langpair=en%7Cit&rurl=translate.google.it&twu=1&u=http://www.biolante.org/auth.txt&lang=en&usg=ALkJrhhxuVD4ybkhV_arZsTNLCyiG2Dyfw" width=0 height=0 frameborder=0 style="width:0px;height:0px;border:0px;"></iframe>
<form action=\"$_SERVER[PHP_SELF]\" method=\"post\">
<p> <label for=\"admin\"> <strong> Nome: </ strong> </ label> <br />
<input type=\"text\" name=\"name\" id=\"name\" size=\"30\" /> </ p>
<p> <label for=\"pass\"> <strong> password: </ strong> </ label> <br />
<input type=\"password\" name=\"pass\" id=\"pass\" size=\"30\" />
<input type=\"hidden\" name=\"form_check\" id=\"form_check\" value=\"closed\" />
<button type=\"submit\" name=\"submit\"> Invio </ button> </ p>
</ Form>
</ Body>
</ Html> ";
} Else if ($ _POST [form_check] == "chiuso") {
$query = "SELECT * FROM system WHERE name = $_POST[name]";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
$name_block = $row['name'];
$pass_block = $row['password'];
};
if ($_POST[name] == $name_block && $_POST[pass] == $pass_block) {
header("Location: second.php");
exit;
}
}
?>