Hey
Jeg har brug for noget hjælp her.
Det er lang tid siden jeg har arbejdet med php og mysql
Men det jeg skal bruge hjælp til er hvordan jeg får det man skriver i felterne over i mysql.
Og en lille ting mere. Jeg har fundet ud af man bare kan komme ind på siden uden og logge ind
hvordan gør man så man skal logge ind først ?
Takker på forhånd
<?
include("connect.php");
$result = mysql_query("select password from gp_login where brugernavn = '$brugernavn'")
or die (mysql_error());
$row = mysql_fetch_array($result);
if($row[password] == $HTTP_POST_VARS[password]){
$query = mysql_query("SELECT * FROM gp");
$row = mysql_fetch_array($query);
?>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<link rel="stylesheet" href="http://rs.codesite.dk/145/style-sort.css" />
</head>
<body bgcolor="#000000" text="#FFFFFF">
<table border="0" cellspacing="0" width="100%" id="AutoNumber3" style="border-collapse: collapse" cellpadding="0">
<tr>
<td width="100%">
<p align="center"><b>
<font face="Verdana" color="#FFFFFF">Vagtplan. Uge<input type="text" name="1-uge" size="1" maxlength="2" value="<?echo $row['1-uge'];?>"><br>
</font></b></td>
</tr>
</table>
<table border="1" cellspacing="0" bordercolor="#3A3A3A" width="100%" id="AutoNumber4" style="border-collapse: collapse" cellpadding="0" height="243">
<tr>
<td width="13%" align="center" height="19"> </td>
<td width="13%" align="center" height="19"><b>
<font color="#FFFFFF" face="Verdana" size="2">Mandag</font></b></td>
<td width="13%" align="center" height="19"><b>
<font color="#FFFFFF" face="Verdana" size="2">Tirsdag</font></b></td>
<td width="13%" align="center" height="19"><b>
<font color="#FFFFFF" face="Verdana" size="2">Onsdag</font></b></td>
<td width="12%" align="center" height="19"><b>
<font color="#FFFFFF" face="Verdana" size="2">Torsdag</font></b></td>
<td width="12%" align="center" height="19"><b>
<font color="#FFFFFF" face="Verdana" size="2">Fredag</font></b></td>
<td width="12%" align="center" height="19"><b>
<font color="#FFFFFF" face="Verdana" size="2">Lørdag</font></b></td>
<td width="12%" align="center" height="19"><b>
<font color="#FFFFFF" face="Verdana" size="2">Søndag</font></b></td>
</tr>
<tr>
<td width="13%" align="center" height="19">
<font color="#FFFFFF" face="Verdana" size="2">
Dato:</font></td>
<td width="13%" align="center" height="19">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-dato1" size="17" maxlength="2" value="<?echo $row['1-dato1'];?>"></font></b></td>
<td width="13%" align="center" height="19">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-dato2" size="17" maxlength="2" value="<?echo $row['1-dato2'];?>"></font></b></td>
<td width="13%" align="center" height="19">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-dato3" size="17" maxlength="2" value="<?echo $row['1-dato3'];?>"></font></b></td>
<td width="12%" align="center" height="19">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-dato4" size="17" maxlength="2" value="<?echo $row['1-dato4'];?>"></font></b></td>
<td width="12%" align="center" height="19">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-dato5" size="17" maxlength="2" value="<?echo $row['1-dato5'];?>"></font></b></td>
<td width="12%" align="center" height="19">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-dato6" size="17" maxlength="2" value="<?echo $row['1-dato6'];?>"></font></b></td>
<td width="12%" align="center" height="19">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-dato7" size="17" maxlength="2" value="<?echo $row['1-dato7'];?>"></font></b></td>
</tr>
<tr>
<td width="13%" align="center" height="67"><b>
<font color="#FFFFFF" face="Verdana" size="2"><br>
10:00<br>
16:00<br>
</font></b></td>
<td width="13%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-mpige10-16" size="17" maxlength="2" value="<?echo $row['1-mpige10-16'];?>"></font></b></td>
<td width="13%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-tpige10-16" size="17" maxlength="2" value="<?echo $row['1-tpige10-16'];?>"></font></b></td>
<td width="13%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-opige10-16" size="17" maxlength="2" value="<?echo $row['1-opige10-16'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" size="2" color="#FFFFFF"><br>
</font>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-topige10-16" size="17" maxlength="2" value="<?echo $row['1-topige10-16'];?>"></font><font face="Verdana" size="2" color="#FFFFFF"><br>
</font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-fpige10-16" size="17" maxlength="2" value="<?echo $row['1-tpige10-16'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-lpige10-16" size="17" maxlength="2" value="<?echo $row['1-lpige10-16'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-spige10-16" size="17" maxlength="2" value="<?echo $row['1-spige10-16'];?>"></font></b></td>
</tr>
<tr>
<td width="13%" align="center" height="67"><b>
<font color="#FFFFFF" face="Verdana" size="2"><br>
16:00<br>
22:00<br>
</font></b></td>
<td width="13%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-mpige16-22" size="17" maxlength="2" value="<?echo $row['1-mpige16-22'];?>"></font></b></td>
<td width="13%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-opige16-22" size="17" maxlength="2" value="<?echo $row['1-opige16-22'];?>"></font></b></td>
<td width="13%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-tpige16-22" size="17" maxlength="2" value="<?echo $row['1-tpige16-22'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-topige16-22" size="17" maxlength="2" value="<?echo $row['1-topige16-22'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-fpige16-22" size="17" maxlength="2" value="<?echo $row['1-fpige16-22'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-lpige16-22" size="17" maxlength="2" value="<?echo $row['1-lpige16-22'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-spige16-22" size="17" maxlength="2" value="<?echo $row['1-spige16-22'];?>"></font></b></td>
</tr>
<tr>
<td width="13%" align="center" height="67"><b>
<font color="#FFFFFF" face="Verdana" size="2"><br>
22:00<br>
04:00<br>
</font></b></td>
<td width="13%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-mpige22-04" size="17" maxlength="2" value="<?echo $row['1-mpige22-04'];?>"></font></b></td>
<td width="13%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-opige22-04" size="17" maxlength="2" value="<?echo $row['1-opige22-04'];?>"></font></b></td>
<td width="13%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-tpige22-04" size="17" maxlength="2" value="<?echo $row['1-tpige22-04'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-topige22-04" size="17" maxlength="2" value="<?echo $row['1-topige22-04'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-fpige22-04" size="17" maxlength="2" value="<?echo $row['1-fpige22-04'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-lpige22-04" size="17" maxlength="2" value="<?echo $row['1-lpige22-04'];?>"></font></b></td>
<td width="12%" align="center" height="67">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="1-spige22-04" size="17" maxlength="2" value="<?echo $row['1-spige22-04'];?>"></font></b></td>
</tr>
</table>
<table border="0" cellspacing="0" width="100%" id="AutoNumber2" style="border-collapse: collapse" cellpadding="0">
<tr>
<td width="100%">
<p align="center"><b>
<font face="Verdana" color="#FFFFFF">Vagtplan. Uge
<input type="text" name="2-uge" size="1" maxlength="2" value="<?echo $row['2-uge'];?>"><br>
</font></b></td>
</tr>
</table>
<table border="1" cellspacing="0" bordercolor="#3A3A3A" width="100%" id="AutoNumber1" style="border-collapse: collapse" cellpadding="0">
<tr>
<td width="13%" align="center"> </td>
<td width="13%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2">Mandag</font></b></td>
<td width="13%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2">Tirsdag</font></b></td>
<td width="13%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2">Onsdag</font></b></td>
<td width="12%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2">Torsdag</font></b></td>
<td width="12%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2">Fredag</font></b></td>
<td width="12%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2">Lørdag</font></b></td>
<td width="12%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2">Søndag</font></b></td>
</tr>
<tr>
<td width="13%" align="center">
<font color="#FFFFFF" face="Verdana" size="2">
Dato:</font></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-dato1" size="17" maxlength="2" value="<?echo $row['2-dato1'];?>"></font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-dato2" size="17" maxlength="2" value="<?echo $row['2-dato2'];?>"></font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-dato3" size="17" maxlength="2" value="<?echo $row['2-dato3'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-dato4" size="17" maxlength="2" value="<?echo $row['2-dato4'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-dato5" size="17" maxlength="2" value="<?echo $row['2-dato5'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-dato6" size="17" maxlength="2" value="<?echo $row['2-dato6'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-dato7" size="17" maxlength="2" value="<?echo $row['2-dato7'];?>"></font></b></td>
</tr>
<tr>
<td width="13%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2"><br>
09:00<br>
16:00<br>
</font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-mpige10-16" size="17" maxlength="2" value="<?echo $row['2-mpige10-16'];?>"></font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-tpige10-16" size="17" maxlength="2" value="<?echo $row['2-tpige10-16'];?>"></font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-opige10-16" size="17" maxlength="2" value="<?echo $row['2-opige10-16'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-topige10-16" size="17" maxlength="2" value="<?echo $row['2-topige10-16'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-fpige10-16" size="17" maxlength="2" value="<?echo $row['2-tpige10-16'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-lpige10-16" size="17" maxlength="2" value="<?echo $row['2-lpige10-16'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-spige10-16" size="17" maxlength="2" value="<?echo $row['2-spige10-16'];?>"></font></b></td>
</tr>
<tr>
<td width="13%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2"><br>
16:00<br>
22:00<br>
</font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-mpige16-22" size="17" maxlength="2" value="<?echo $row['2-mpige16-22'];?>"></font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-opige16-22" size="17" maxlength="2" value="<?echo $row['2-opige16-22'];?>"></font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-tpige16-22" size="17" maxlength="2" value="<?echo $row['2-tpige16-22'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-topige16-22" size="17" maxlength="2" value="<?echo $row['2-topige16-22'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-fpige16-22" size="17" maxlength="2" value="<?echo $row['2-fpige16-22'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-lpige16-22" size="17" maxlength="2" value="<?echo $row['2-lpige16-22'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-spige16-22" size="17" maxlength="2" value="<?echo $row['2-spige16-22'];?>"></font></b></td>
</tr>
<tr>
<td width="13%" align="center"><b>
<font color="#FFFFFF" face="Verdana" size="2"><br>
22:00<br>
04:00<br>
</font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-mpige22-04" size="17" maxlength="2" value="<?echo $row['2-mpige22-04'];?>"></font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-opige22-04" size="17" maxlength="2" value="<?echo $row['2-opige22-04'];?>"></font></b></td>
<td width="13%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-tpige22-04" size="17" maxlength="2" value="<?echo $row['2-tpige22-04'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-topige22-04" size="17" maxlength="2" value="<?echo $row['2-topige22-04'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-fpige22-04" size="17" maxlength="2" value="<?echo $row['2-fpige22-04'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-lpige22-04" size="17" maxlength="2" value="<?echo $row['2-lpige22-04'];?>"></font></b></td>
<td width="12%" align="center">
<b>
<font face="Verdana" color="#FFFFFF">
<input type="textarea" name="2-spige22-04" size="17" maxlength="2" value="<?echo $row['2-spige22-04'];?>"></font></b></td>
</tr>
</table>
</body>
</html>
<?
}
else{
echo 'Forkert password';
exit;
?>
<?
}
?>