[php:1:617d2d809e]<?php
<? include ("header.tpl") ; ?>
<?
include("config.cfg");
$db=mysql_connect("$sql_host", "$sql_user", "$sql_pass") or die("Nie można się połączyć z serwerem"); # łaczenie się z bazą danych
mysql_select_db("$sql_base", $db) or die("Problem z łączeniem się z bazą danych

$sql2="UPDATE `gracze` SET `grupa` = '$addgrupa' AND `win` = '$addwin' AND `loss` = '$addloss' AND `pkt` = '$addpkt' WHERE nick = '$nick'" or die("nie można dodac do bazy");
$sql="SELECT * FROM gracze ";
$result = mysql_query($sql);
print " <table cellspacing=0 cellpadding=0 width=200 align="center">";
print "<tr>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> Nick</span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> Grupa</span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> Win</span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> Loss</span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> pkt</span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> Zmien grupe na</span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> Zmien ilosc winow</span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> Zmien ilosc lossow</span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> Zmien ilosc punktow</span></td>";
print "</tr>";
while ($row =mysql_fetch_array ($result)) :
print "<tr>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> ".$row ["nick"]. " </span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> ".$row ["grupa"]. " </span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> ".$row ["win"]. " </span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> ".$row ["loss"]. " </span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> ".$row ["pkt"]. " </span></td>";
print "<form method ="post" name="grupy" action="#">";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> <input type="text" name="addgrupa" style="height:15px;font-size:10px;width:50px; "> </span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> <input type="text" name="addwin" style="height:15px;font-size:10px;width:50px; "> </span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> <input type="text" name="addloss" style="height:15px;font-size:10px;width:50px; "> </span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> <input type="text" name="addpkt" style="height:15px;font-size:10px;width:50px; "> </span></td>";
print "<td style="border-style:dashed;border-color:#00ACFF;border-width:1px "><span style="font-size: 11px; font-family: tahoma; font-weight: bold; "> <input type="submit" name="zmien" value="Zapisz" size="6 " style="height:19px;font-size:10px; " ></td>";
print "</tr>";
print "</form>";
if($addgrupa != null && $addwin != null && $addloss != null && $addpkt != null ) {
mysql_query($sql2) or die("nie można dodac do bazy2");
}
endwhile;
print "</table>";
mysql_close();
?>
<? include ("footer.tpl") ; ?>
?>[/php:1:617d2d809e]
Tabela gracze wyglada tak : id date nick email gg grupa win loss pkt miasto