Już nie wiem co mam robić. Może dam cały kod :
<?php
if (!isset($_SESSION['username'])) {
header('Location: ./login.php'); }
?>
<?php
$error_message1 = "";
$action = isset($_POST['action']) ?
$_POST['action'] : ''; $mysql_server = 'localhost';
$mysql_username = 'xxx';
$mysql_password = 'xxx';
$mysql_database = 'xxx';
$mysql_table = 'nagroda1';
$db = mysql_connect($mysql_server, $mysql_username, $mysql_password); $sql = "SELECT id FROM ".$mysql_table;
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $nagroda1 >= 2 )
{
$error_message1 = 'Pula nagród wyczerpana.';
}
else
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="pl">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Katalog nagród</title>
<style type="text/css">
div#container
{
width: 1250px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
</style>
<style type="text/css">
body
{
text-align: center;
margin: 0;
background-color: #FFFFFF;
color: #000000;
}
</style>
<script type="text/javascript">
<!--
function SetImage(id, filename)
{
var elem=document.getElementById(id);
if(elem)
{
elem.src=filename;
}
}
//-->
</script>
</head>
<body>
<div id="container">
<div id="wb_Shape1" style="margin:0;padding:0;position:absolute;left:259px;top:295px;width:745px;heigh
t:884px;text-align:left;z-index:0;">
<img src="images/img0015.png" id="Shape1" alt="" title="" style="border-width:0;width:745px;height:884px"></div>
<div id="wb_Image1" style="margin:0;padding:0;position:absolute;left:254px;top:46px;width:740px;height
:168px;text-align:left;z-index:1;">
<img src="images/top.bez.png" id="Image1" alt="" border="0" style="width:740px;height:168px;"></div>
<div id="wb_Image2" style="margin:0;padding:0;position:absolute;left:253px;top:0px;width:105px;height:
45px;text-align:left;z-index:2;">
<a href="./index.html" onmouseover="SetImage('Image2','images/button-niebieski_01.png');return false;" onmouseout="SetImage('Image2','images/przycisk-szary1_01.png');return false;"><img src="images/przycisk-szary1_01.png" id="Image2" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image3" style="margin:0;padding:0;position:absolute;left:358px;top:0px;width:105px;height:
45px;text-align:left;z-index:3;">
<a href="./rejestracja.html" onmouseover="SetImage('Image3','images/button-niebieski_02.png');return false;" onmouseout="SetImage('Image3','images/przycisk-szary1_02.png');return false;"><img src="images/przycisk-szary1_02.png" id="Image3" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image4" style="margin:0;padding:0;position:absolute;left:463px;top:0px;width:105px;height:
45px;text-align:left;z-index:4;">
<a href="./oferty.html" onmouseover="SetImage('Image4','images/button-niebieski_03.png');return false;" onmouseout="SetImage('Image4','images/przycisk-szary1_03.png');return false;"><img src="images/przycisk-szary1_03.png" id="Image4" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image5" style="margin:0;padding:0;position:absolute;left:568px;top:0px;width:105px;height:
45px;text-align:left;z-index:5;">
<a href="./dowody.html" onmouseover="SetImage('Image5','images/button-niebieski_04.png');return false;" onmouseout="SetImage('Image5','images/przycisk-szary1_04.png');return false;"><img src="images/przycisk-szary1_04.png" id="Image5" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image6" style="margin:0;padding:0;position:absolute;left:673px;top:0px;width:105px;height:
45px;text-align:left;z-index:6;">
<a href="./zasady.html" onmouseover="SetImage('Image6','images/button-niebieski_05.png');return false;" onmouseout="SetImage('Image6','images/przycisk-szary1_05.png');return false;"><img src="images/przycisk-szary1_05.png" id="Image6" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image7" style="margin:0;padding:0;position:absolute;left:778px;top:0px;width:105px;height:
45px;text-align:left;z-index:7;">
<a href="./wyplata.html" onmouseover="SetImage('Image7','images/button-niebieski_06.png');return false;" onmouseout="SetImage('Image7','images/przycisk-szary1_06.png');return false;"><img src="images/przycisk-szary1_06.png" id="Image7" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image8" style="margin:0;padding:0;position:absolute;left:883px;top:0px;width:105px;height:
45px;text-align:left;z-index:8;">
<a href="./forum.html" onmouseover="SetImage('Image8','images/button-niebieski_07.png');return false;" onmouseout="SetImage('Image8','images/przycisk-szary1_07.png');return false;"><img src="images/przycisk-szary1_07.png" id="Image8" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image9" style="margin:0;padding:0;position:absolute;left:354px;top:326px;width:154px;heigh
t:240px;text-align:left;z-index:9;">
<a href="./nagroda1.php"><img src="images/godzrestocku.png" id="Image9" alt="" border="0" style="width:154px;height:240px;"></a></div>
<div id="wb_Image10" style="margin:0;padding:0;position:absolute;left:552px;top:326px;width:154px;heigh
t:240px;text-align:left;z-index:10;">
<img src="images/javelin30.png" id="Image10" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Image11" style="margin:0;padding:0;position:absolute;left:750px;top:326px;width:154px;heigh
t:240px;text-align:left;z-index:11;">
<img src="images/pktx2.png" id="Image11" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Image12" style="margin:0;padding:0;position:absolute;left:354px;top:602px;width:154px;heigh
t:240px;text-align:left;z-index:12;">
<img src="images/premiumnagrodaeu.png" id="Image12" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Image13" style="margin:0;padding:0;position:absolute;left:552px;top:602px;width:154px;heigh
t:240px;text-align:left;z-index:13;">
<img src="images/premka3.png" id="Image13" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Image14" style="margin:0;padding:0;position:absolute;left:751px;top:602px;width:154px;heigh
t:240px;text-align:left;z-index:14;">
<img src="images/losowygift.png" id="Image14" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Shape2" style="margin:0;padding:0;position:absolute;left:413px;top:234px;width:453px;heigh
t:52px;text-align:center;z-index:15;">
<img src="images/img0016.png" id="Shape2" alt="" title="" style="border-width:0;width:453px;height:52px"></div>
<div id="Html1" style="position:absolute;left:593px;top:459px;width:222px;height:252px;z-index:16">
<div id="Html3" style="position:absolute;left:319px;top:302px;width:134px;height:24px;z-index:16">
<?php echo $error_message1;?></div>
</div>
</div>
</body>
</html>
Ten post edytował kiepski96 4.04.2011, 16:15:03