Hello people. I got a problem but i think it will be solved very fast. But ican't find the answer. PLZZZZZZZZZZ help me. Tnx
I got this on first page :
<html><head><script LANGUAGE="JavaScript">
document.write('<link rel="stylesheet" href="../dutchstyle.css" type="text/css">');
</script>head>
<BODY topmargin="0" bgproperties="fixed" background="../images/achtergrond4.jpg">
<?php
include("connect.php");
if ($do_this=="list_all"):
$result = mysql_query("SELECT * FROM $glossary_table ORDER BY username");
echo "<table style='$glossary_table_style'><tr style='$glossary_header_style'><td>$feild1name (",mysql_num_rows($result),")</td></tr>";
while ($row = mysql_fetch_array($result,MYSQL_NUM)) {
echo "<tr><td style='$glossary_word_style'><a href=\"check_players.php?id_$row[0]\">$row[1]</a></td></tr>";
}
echo "</table>";
mysql_close($link);
exit;
else :
echo "";
echo " ";
endif;
?>
</body></html>
$row[0] are id's $row[1] are all the usernames
The meaning is when i press a certain username it will display the info according to the id
2nd page:
<html>
<head><script LANGUAGE="JavaScript">
document.write('<link rel="stylesheet" href="../dutchstyle.css" type="text/css">');
</script><title>Welcome to UT2K3League.net</title></head>
<BODY topmargin="0" bgproperties="fixed" background="../images/achtergrond4.jpg">
<?
/ declare some relevant variables /
$DBhost = "localhost";
$DBuser = "user";
$DBpass = "pass";
$DBName = "db";
$table = "table";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
@mysql_select_db("$DBName") or die("Unable to select database $DBName"); $sqlquery = "SELECT * FROM $table limit 1";
$result = mysql_query($sqlquery);
$numrows = mysql_num_rows($result);
//set counter variable
$i=1;
while($myrow = mysql_fetch_array($result))
{
echo"<TABLE BORDER='0' CELLPADDING='2' CELLSPACING='2' class=\"formtext\">";
echo"<TR>";
echo"<tr>";
echo"<td class=\"formtext\">Player Name:$myrow[username] </td>";
echo"</tr>";
echo"<tr>";
echo"<td class=\"formtext\">Email: <a href=mailto:$myrow[email]>$myrow[email]</a></td>";
echo"</tr>";
echo"<tr>";
echo"<td class=\"formtext\"> </td>";
echo"</tr>";
echo"<tr>";
echo"<td class=\"formtext\">Clan(s):</td>";
echo"</tr>";
echo"</TABLE>";
//increment counter variable
$i++;
}
?>
</BODY></HTML>
When i use this it will only display the first record in the database when i press a link.
Thanks allready