Nieuw lid |
|
k nu is het:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Created on 31-mei-2007 22:25:32 -->
<html>
<head>
<style type="text/css">
html {
color: #FF0000;
background-color: #000;
}
input {
color: #FF0000;
background-color: #000;
}
</style>
<title>
null
</title>
</head>
<body>
<?php
$host = "localhost"; // naam van host
$dbuser = "root"; //mysql gebruikersnaam
$pass = ""; //mysql wachtwoord
$db = "cijferdatabase"; //mysql database
mysql_connect($host,$dbuser,$pass) or die(mysql_error());
mysql_select_db($db);
if (!$_POST['nicknameform']) // Als nog niet verzonden is :
{
echo "<form action=\"Untitled1.php\" method=\"post\" > \n";
echo "Nick: <input type=\"text\" name=\"nicknameform\" /><br /> \n";
echo "<input type=\"submit\"> \n";
echo "</form> \n ";
}
else // als er wel formulier verzonden is:
{
$query1 = mysql_query("SELECT * FROM leden WHERE nickname=".$_POST['nicknameform']."") or die(mysql_error()); // zoekt ID
$query2 = mysql_query("SELECT * FROM cijfers WHERE ll_id=".$query1."") or die(mysql_error()); // zoekt cijfers
// begin cijfers weergeven
echo "De cijfers van leerling: ". $_POST['nicknameform'] ."\n";
echo "<table class=\"cijferstabel\" border=\"1\">\n \n";
echo "<tr id=\"headingvoortabel\">\n <td> Vak:</td>\n <td> Cijfer:</td>\n <td> Weging:</td> \n</tr>";
while($res = mysql_fetch_assoc($query2)) {
echo "<tr class=\"wordbekeken\">\n <td>". $res['vak_id'] ."</td> \n";
echo " <td> ". $res['cijfer'] ." </td> \n ";
echo " <td>". $res['weging'] ." </td> \n</tr> \n ";
}
echo "</table>";
// einde cijfers weergeven
};
?>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- Created on 31-mei-2007 22:25:32 --> <html> <head> <style type="text/css"> html { color: #FF0000; background-color: #000; } input { color: #FF0000; background-color: #000; } </style> <title> null </title> </head> <body> <?php $host = "localhost"; // naam van host $dbuser = "root"; //mysql gebruikersnaam $pass = ""; //mysql wachtwoord $db = "cijferdatabase"; //mysql database if (!$_POST['nicknameform']) // Als nog niet verzonden is : { echo "<form action=\"Untitled1.php\" method=\"post\" > \n"; echo "Nick: <input type=\"text\" name=\"nicknameform\" /><br /> \n"; echo "<input type=\"submit\"> \n"; } else // als er wel formulier verzonden is: { // begin cijfers weergeven echo "De cijfers van leerling: ". $_POST['nicknameform'] ."\n"; echo "<table class=\"cijferstabel\" border=\"1\">\n \n"; echo "<tr id=\"headingvoortabel\">\n <td> Vak:</td>\n <td> Cijfer:</td>\n <td> Weging:</td> \n</tr>"; echo "<tr class=\"wordbekeken\">\n <td>". $res['vak_id'] ."</td> \n"; echo " <td> ". $res['cijfer'] ." </td> \n "; echo " <td>". $res['weging'] ." </td> \n</tr> \n "; } // einde cijfers weergeven }; ?> </body> </html>
Alleen zegt hij hetzelfde:S |