Kode: Vælg alt
<!DOCTYPE html>
<html>
<head>
<title>multicraft - danmark</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css.css" type="text/css"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
</head>
<body>
<!--hovde div-->
<div id="hovdediv">
<?php
include 'top.php';
?>
<div id="indhold">
<!--facebookdiv-->
<div id="facebookdiv">
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2Fmulticraft%2F133124410123291&width=292&height=590&colorscheme=dark&show_faces=true&border_color&stream=true&header=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:590px;" allowTransparency="true"></iframe>
</div>
<?php
session_start();
$mysql_host = "*********";
$mysql_database = "*******";
$mysql_user = "********";
$mysql_password = "******";
$link = mysql_connect($mysql_host,$mysql_user,$mysql_password);
mysql_select_db($mysql_database,$link);
if ($_POST['login_send'] == "yes"){
$query = "select * from user where username = '".$_POST['user']."'";
$result = mysql_query($query);
if ($row=mysql_fetch_array($result)){
if ($row['pass'] == $_POST['pass'])
$_SESSION['logged_in']='yes';
}
}
if ($_GET['logout']=='true')
$_SESSION['logged_in']='no';
if ($_SESSION['logged_in']=="yes"){
echo "du er logget ind velkommen <a href='?logout=true' id='logud'>logud</a><br/> <a href='mod.php' id='logud'>til admin side</a>";
} else {
echo "du er ikke loget ind";
}
echo "<form name=login method=post>
Navn:<input type=text name=user><br>
Kode:<input type=password name=pass><br>
<input type=hidden name=login_send value='yes'>
<input type=submit>
</form>";
?>
</div>
<!--bonddiv-->
<div id="bond">
<?php
include 'bond.php';
?>
</div>
</div>
</body>
</html>