Nieuw lid |
|
Momenteel ben ik bezig met een categorie systeem. Nu vraag ik mij af of het mogelijk is alles in éé pagina te open. Voorlopig heb ik zo opgelost:
Hoofdgroeptabel:
http://www.medi...ptabel.JPG
Subgroeptabel:
http://www.medionowners.be/meuk/subgroeptabel.JPG
infotabel:
http://www.medionowners.be/meuk/infotabel.JPG
index1:
<?php
include_once 'configuratie.php';
$sql = "SELECT `id`,`naam` FROM hoofdgroeptabel ";
//-- via de functie mysql_query() kun je de SQL code
//-- die in $sql staat uitvoeren.
$res = mysql_query($sql) or die(mysql_error());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
Link: <br /><br />
<?php
while( $row = mysql_fetch_array( $res ) ) {
echo " <a href=\"index1.php?id=" . $row['id'] . "\">" . htmlentities($row['naam']) . "</a><br>";
}
?>
</body>
</html>
<?php include_once 'configuratie.php'; $sql = "SELECT `id`,`naam` FROM hoofdgroeptabel "; //-- via de functie mysql_query() kun je de SQL code //-- die in $sql staat uitvoeren. ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> </head> <body> Link: <br /><br /> <?php echo " <a href=\"index1.php?id=" . $row['id'] . "\">" . htmlentities($row['naam']) . "</a><br>"; } ?> </body> </html>
index1.php:
<?php
include_once 'configuratie.php';
$id = mysql_real_escape_string($_GET['id']);
$sql = "SELECT `hoofdgroeptabelid`,`naam`, `id` FROM subgroeptabel WHERE `hoofdgroeptabelid` = '$id'";
//-- via de functie mysql_query() kun je de SQL code
//-- die in $sql staat uitvoeren.
$res = mysql_query($sql) or die(mysql_error());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
Link: <br /><br />
<?php
while( $row = mysql_fetch_array( $res ) ) {
echo " <a href=\"index2.php?id=" . $row['id'] . "\">" . htmlentities($row['naam']) . "</a><br>";
}
?>
</body>
</html>
<?php include_once 'configuratie.php'; $sql = "SELECT `hoofdgroeptabelid`,`naam`, `id` FROM subgroeptabel WHERE `hoofdgroeptabelid` = '$id'"; //-- via de functie mysql_query() kun je de SQL code //-- die in $sql staat uitvoeren. ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> </head> <body> Link: <br /><br /> <?php echo " <a href=\"index2.php?id=" . $row['id'] . "\">" . htmlentities($row['naam']) . "</a><br>"; } ?> </body> </html>
index2.php:
<?php
include_once 'configuratie.php';
$id = mysql_real_escape_string($_GET['id']);
$sql = "SELECT `subgroeptabelid` ,`tip`,`id`,`titel`,`date` FROM infotabel WHERE `subgroeptabelid` = '$id'";
//-- via de functie mysql_query() kun je de SQL code
//-- die in $sql staat uitvoeren.
$res = mysql_query($sql) or die(mysql_error());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
Link: <br /><br />
<?php
while( $row = mysql_fetch_array( $res ) ) {
echo " <a href=\"index3.php?id=" . $row['id'] . "\">" . htmlentities($row['titel']) . "</a><br>";
}
?>
</body>
</html>
<?php include_once 'configuratie.php'; $sql = "SELECT `subgroeptabelid` ,`tip`,`id`,`titel`,`date` FROM infotabel WHERE `subgroeptabelid` = '$id'"; //-- via de functie mysql_query() kun je de SQL code //-- die in $sql staat uitvoeren. ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> </head> <body> Link: <br /><br /> <?php echo " <a href=\"index3.php?id=" . $row['id'] . "\">" . htmlentities($row['titel']) . "</a><br>"; } ?> </body> </html>
index3.php:
<?php
include_once 'configuratie.php';
$id = mysql_real_escape_string($_GET['id']);
$sql = "SELECT `subgroeptabelid` ,`tip`,`id`,`titel`,`date` FROM infotabel WHERE `id` = '$id'";
//-- via de functie mysql_query() kun je de SQL code
//-- die in $sql staat uitvoeren.
$res = mysql_query($sql) or die(mysql_error());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<br /><br />
<?php
$row = mysql_fetch_array( $res );
$row['tip'] = nl2br($row['tip']);
echo $row['tip'];
?>
</body>
</html>
<?php include_once 'configuratie.php'; $sql = "SELECT `subgroeptabelid` ,`tip`,`id`,`titel`,`date` FROM infotabel WHERE `id` = '$id'"; //-- via de functie mysql_query() kun je de SQL code //-- die in $sql staat uitvoeren. ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> </head> <body> <br /><br /> <?php $row['tip'] = nl2br($row['tip']); ?> </body> </html>
|