nu får jeg denne fejl
ÿØÿàJFIFÿÛ„ (#/ $'*0,-150*5&+,) ,$$,,),,)),,-),,-,,,5-,),),),1),),,).),)),)),,,,),),,ÿÀÃ"ÿÄÿÄE !1A"Qaq2‘¡±#$3BRbrÁð²ÂÑáCs‚'¢Òñ4S³ÃÿÄÿÄ-!1A"Qaq2‘±ðÑá#¡ÿÚ?î1DDD@DDD@DDD@DDD@DDD@DDD@DD†Þ=£Š °ÔuéoœMi¡ >—6Í}Y3S§À9•L&ì@fW/Z™ÓApÚ†½®-qsÄ‹ê>‘éÿ›FªÄ5¼se>é'¼››†Ú Ed¥¬µ"Q{5ûCð›‰Çñ{:½E,\‘Y£ÉQž¥;hJ&[¢lTô›¡7ª®wãn•ëg7©£¼Ô+6Er¯ÿÇQ"ù €fò¼"œ‡iìê¸|:VÄ0b_#€s„L§)g<º ¸xÉ]...½¦‚¡Z‚ªX
efter at jeg lavet mine kode sårdan her
index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/ (...)
<html xmlns="
http://www.w3.org/ (...)
<?php
//Start session
session_start();
//Unset the variables stored in session
if (!isset($_POST[""])) {
unset($_SESSION['SESS_MEMBER_ID']);
unset($_SESSION['SESS_FIRST_NAME']);
unset($_SESSION['SESS_LAST_NAME']);
unset($_SESSION['SESS_FIRSTNAME']);
unset($_SESSION['SESS_LASTNAME']);
unset($_SESSION['SESS_address']);
unset($_SESSION['SESS_contact']);
unset($_SESSION['SESS_picture']);
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>UMSP</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="main_container">
<div id="header">
<div class="logo"><img src="images/logo.png" border="0" alt="" title="" /></div>
</div>
<div class="menu">
<ul>
<li class="selected"><a href="index.php">Forside</a></li>
<li><a href="Driftsinfo.php">Driftsinfo</a></li>
<li><a href="Hjælp.php">Hjælp</a></li>
<li><a href="Om os.php">Om os</a></li>
<li><a href="Kontakt.php">Kontakt</a></li>
</ul>
</div>
<div class="center_content">
<div class="center_left">
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
</div>
<div class="center_right">
<div class="text_box">
<div class="title">Medarbejder-login</div>
<form name="loginform" action="login_exec.php" method="post">
<?php
if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {
echo '<ul class="err">';
foreach($_SESSION['ERRMSG_ARR'] as $msg) {
echo '<li>',$msg,'</li>';
}
echo '</ul>';
unset($_SESSION['ERRMSG_ARR']);
}
?>
<div class="login_form_row">
<label class="login_label">CPR.:</label><input type="password" name="username" class="login_input" />
</div>
<div class="login_form_row">
<label class="login_label">Password:</label><input type="password" name="password" class="login_input" />
</div>
<input type="image" src="images/login.gif" class="login" />
</div>
</form>
<div class="testimonials">
<div class="title">vores hjælpelinje</div>
<div class="text_box">
<p class="testimonial">
bla bla bla bla bla bla bla
bla bla bla bla bla bla bla
bla bla bla bla bla bla bla
</p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div id="footer">
<br>
<center>Copyright © 2012-<?php echo date('Y'); ?> UMSP.dk - All Rights Reserved<center>
</div>
<!-- end of main_container -->
</body>
</html>
login_exec.php
<?php
//Start session
session_start();
//Include database connection details
require_once('connection.php');
//Array to store validation errors
$errmsg_arr = array();
//Validation error flag
$errflag = false;
//Function to sanitize values received from the form. Prevents SQL injection
function clean($str) {
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
}
//Sanitize the POST values
$username = clean($_POST['username']);
$password = clean($_POST['password']);
//Input Validations
if($username == '') {
$errmsg_arr[] = 'CPR. mangler';
$errflag = true;
}
if($password == '') {
$errmsg_arr[] = 'password mangler';
$errflag = true;
}
//If there are input validations, redirect back to the login form
if($errflag) {
$_SESSION['ERRMSG_ARR'] = $errmsg_arr;
session_write_close();
header("location: index.php");
exit();
}
//Create query
$qry="SELECT * FROM member WHERE username='$username' AND password='$password'";
$result=mysql_query($qry);
//Check whether the query was successful or not
if($result) {
if(mysql_num_rows($result) > 0) {
//Login Successful
session_regenerate_id();
$member = mysql_fetch_array($result);
$_SESSION['SESS_MEMBER_ID'] = $member['mem_id'];
$_SESSION['SESS_FIRST_NAME'] = $member['username'];
$_SESSION['SESS_LAST_NAME'] = $member['password'];
$_SESSION['SESS_FIRSTNAME'] = $member['fname'];
$_SESSION['SESS_LASTNAME'] = $member['lname'];
$_SESSION['SESS_address'] = $member['address'];
$_SESSION['SESS_contact'] = $member['contact'];
$_SESSION['SESS_picture'] = $member['picture'];
session_write_close();
header("location: home.php");
exit();
}else {
//Login failed
$errmsg_arr[] = 'CPR. og password blev ikke fundet';
$errflag = true;
if($errflag) {
$_SESSION['ERRMSG_ARR'] = $errmsg_arr;
session_write_close();
header("location: index.php");
exit();
}
}
}else {
die("Query failed");
}
?>
home.php
<?php
require_once('auth.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=windows-1252" />
<title>UMSP</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="main_container">
<div id="header">
<div class="logo"><img src="images/logo.png" border="0" alt="" title="" /></div>
</div>
<div class="menu">
<ul>
<li class="selected"><a href="home.php">Forside</a></li>
</ul>
</div>
<div class="center_content">
<div class="center_left">
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla
</div>
<div class="center_right">
<div class="text_box">
<div class="title">Medarbejder-login</div>
<?php
if (isset($_SESSION['SESS_FIRSTNAME']))
echo "Du er logget ind med følgende oplysninger: <br> <br> " .$_SESSION['SESS_FIRSTNAME']." ".$_SESSION['SESS_LASTNAME']." <br> ".$_SESSION['SESS_address']." <br> ".$_SESSION['SESS_contact'];
?>
<br>
<a href="index.php"><img src="images/logof.png" /></a>
</div>
<div class="testimonials">
<div class="title">vores hjælpelinje</div>
<div class="text_box">
<p class="testimonial">
<?php
echo $_SESSION['SESS_picture'];
?>
</p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div id="footer">
<br>
<center>Copyright © 2012-<?php echo date('Y'); ?> UMSP.dk - All Rights Reserved<center>
</div>
<!-- end of main_container -->
</body>
</html>