Snažím se udělat takový player checker do hry King Athurs Gold, kde když zadáte do formuláře méno, tak vám vyběhne tabulka se statusem toho hráče(kdy byl naposledy online, na jakym serveru atd.).
Takto mám udělaný index.php:
Kód: Vybrat vše
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>KAG player checker</title>
</head>
<body>
<p>Welcome in King Arthurs Gold player checker. Please, write a name of player.</p>
<form method="POST" action="check.php">
<input name="name" type="text" /><br />
<input type="submit" value="Search" />
</form>
</body>
</html>
a takto check.php:
Kód: Vybrat vše
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>KAG player checker</title>
</head>
<body>
<?php
$name = $_POST['name'];
$status = <img width="525" height="25" src="https://poc.kag2d.com/siggen/kagstatus-simple.php?username=.$name">;
echo($status);
?>
</body>
</html>
Bohužel nevím, jak napojit php proměnnou do html kódu, jedná se o to username, za ním potřebuji, aby byla proměnná $name, jenže nevím, jak to spojit.
Když to zkouším takto, tak to háže chybu HTML 500.
Jedná se o tento web: http://kagplayerchecker.4fan.cz/
Děkuji za pomoc