Hi trying to create a list structure list "nvidia/ati" had before you select something in one list and then the second list updates with values based on you selection. It will not be drivers and static items tho.
So the purpose of this is to get a tree structure from members so the first list will be a list with all members im in first list to be parent to.
So if the first list is:
Tom
Jay
Markus
If i select Tom, i sould from a mysql query get all children to Tom, and so on in 5 levels.
Currently I have this bit of code:
<?php
require_once('auth.php');
require_once('config.php');
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login Form</title>
<link href="loginmodule.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main">
<h1>Register Sale </h1>
<a href="member-profile.php">My Profile</a> | <a href="sale-page.php">Sale</a> | <a href="team-page.php">Team</a> | <a href="logout.php">Logout</a>
<?php
if (isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) > 0) {
echo '<ul class="err">';
foreach ($_SESSION['ERRMSG_ARR'] as $msg) {
echo '<li>', $msg, '</li>';
}
echo '</ul>';
unset($_SESSION['ERRMSG_ARR']);
}
?>
<?php
$team_connect = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if (!$team_connect) {
die("Failed to connect to server" . mysql_error());
}
$db_team = mysql_select_db(DB_DATABASE);
if (!$db_team) {
die("Could not fetch database");
}
$team_qry = "SELECT member_id, firstname FROM members";
$result = mysql_query($team_qry);
if (!$result) {
print "EMPTY ARRAY";
}
$options = "";
while ($row = mysql_fetch_array($result)) {
$id = $row["member_id"];
$thing = $row["firstname"];
$options.="<OPTION VALUE=\"$id\">" . $thing . '</option>';
}
?>
<?php
function myfunction(){
echo("<strong>I love PHP !</strong><br>");
}
?>
<br /><br />
<td>
<select name="jlist" onClick="myfunction()" size="3">
<?php echo $options ?>
</select>
</td>
<td>
<select name="jlist" onClick="myfunction()" size="10">
<?php echo $options ?>
</select>
</td>
<td>
<select name="jlist" onClick="myfunction()" size="10">
<?php echo $options ?>
</select>
</td>
<td>
<select name="jlist" onClick="myfunction()" size="10">
<?php echo $options ?>
</select>
</td>
<td>
<select name="jlist" onClick="myfunction()" size="10">
<?php echo $options ?>
</select>
</td>
<?php
echo date('Ymd');
?>
<h1></h1><i>Password Protected Area </i></div>
</body>
</html>
But I cant even get I love php to print out when i select something.. would love som help.. :)