Wiem, że to mój 1 post na forum, jestem trochę ciemny w php, potrafię już dodawać rekordy do bazy danych, zmieniac je, usuwać, segregować, lecz nie potrafię jeszcze używać metody $_GET.
Chciałbym aby moja strona była generowana dynamicznie tak jak na ots.pl
Chodzi o to, że po kliknięciu na jakiś ots z listy pokazują się o nim dokładne informacje w ten sposób:

Oto adres mojej strony na której zastosowałem mój nowatorski skrypt listy, ale chciałbym aby dokładne dane były wyświetlane tak jak na ots.pl
W ten sposób w pasku adresu: http://ots.pl/detal.php?id=45292
Chodzi mi o to żebym nie musiał do każdego ots robić ręcznie nowej podstony, każda z innymi danymi.
Adres do mojej strony:http://megalista.ynd.pl
Mam dopiero 14lat, a z php bawię się od niedawna.
Ale funkcje i sesje są dla mnie nadal nie do zrozumienia chociarz czytałem już wiele poradników na ten temat.
Mój skrypt wyświetlający listę ots wygląda tak:
CODE
$wynik = mysql_query ("SELECT * FROM `lista`;");
print "";
print " <FONT face="mortis" size="2">Nazwa <FONT face="mortis" size="2"> IP <FONT face="mortis" size="2"> Port <FONT face="mortis" size="2"> Graczy <FONT face="mortis" size="2"> Uptime ";
print " <FONT face="mortis" size="2"> Klient <FONT face="mortis" size="2"> EXP <FONT face="mortis" size="2"> Typ ";
print "\n";
while ($rekord = mysql_fetch_assoc($wynik)) {
$nr = $rekord['nr'];
$name = $rekord['name'];
$host = $rekord['host'];
$port = $rekord['port'];
$ver = $rekord['ver'];
$exp = $rekord['exp'];
$type = $rekord['type'];
$ip_serwera = $host;
$port_serwera = $port;
$info = chr(6).chr(0).chr(255).chr(255).'info';
$sock = @fsockopen($ip_serwera, $port_serwera, $errno, $errstr, 1);
if ($sock)
{
fwrite($sock, $info);
$data='';
while (!feof($sock))
$data .= fgets($sock, 1024);
preg_match('/uptime="(\d+)"/', $data, $matches);
$h = floor($matches[1] / 3600);
$m = floor(($matches[1] - $h*3600) / 60);
preg_match('/players online="(\d+)" max="(\d+)" peak="(\d+)"/', $data, $matches);
print "";
print " <FONT face="Papyrus" size="2"> $name <FONT face="Papyrus" size="2"> $host <FONT face="Papyrus" size="2"> $port <FONT face="Papyrus" size="2"> $matches[1] / $matches[2] <FONT face="Papyrus" size="2"> $h godzin $m minut ";
print " <FONT face="Papyrus" size="2"> $ver <FONT face="Papyrus" size="2"> $exp <FONT face="Papyrus" size="2"> $type ";
print "";
fclose($sock);
}
else
print " ";
}
print '';
?>
print "";
print " <FONT face="mortis" size="2">Nazwa <FONT face="mortis" size="2"> IP <FONT face="mortis" size="2"> Port <FONT face="mortis" size="2"> Graczy <FONT face="mortis" size="2"> Uptime ";
print " <FONT face="mortis" size="2"> Klient <FONT face="mortis" size="2"> EXP <FONT face="mortis" size="2"> Typ ";
print "\n";
while ($rekord = mysql_fetch_assoc($wynik)) {
$nr = $rekord['nr'];
$name = $rekord['name'];
$host = $rekord['host'];
$port = $rekord['port'];
$ver = $rekord['ver'];
$exp = $rekord['exp'];
$type = $rekord['type'];
$ip_serwera = $host;
$port_serwera = $port;
$info = chr(6).chr(0).chr(255).chr(255).'info';
$sock = @fsockopen($ip_serwera, $port_serwera, $errno, $errstr, 1);
if ($sock)
{
fwrite($sock, $info);
$data='';
while (!feof($sock))
$data .= fgets($sock, 1024);
preg_match('/uptime="(\d+)"/', $data, $matches);
$h = floor($matches[1] / 3600);
$m = floor(($matches[1] - $h*3600) / 60);
preg_match('/players online="(\d+)" max="(\d+)" peak="(\d+)"/', $data, $matches);
print "";
print " <FONT face="Papyrus" size="2"> $name <FONT face="Papyrus" size="2"> $host <FONT face="Papyrus" size="2"> $port <FONT face="Papyrus" size="2"> $matches[1] / $matches[2] <FONT face="Papyrus" size="2"> $h godzin $m minut ";
print " <FONT face="Papyrus" size="2"> $ver <FONT face="Papyrus" size="2"> $exp <FONT face="Papyrus" size="2"> $type ";
print "";
fclose($sock);
}
else
print " ";
}
print '';
?>
A baza danych ma taką budowę:
nazwa bazy danych=otslista
w bazie jest 1 tabela o nazwie=lista
tabela ma taką budowę:
nr
name
host
port
ver
exp
type