I have it in the code, it just won't print; need to print out the details of a customer selected by a listbox
<link rel="stylesheet" type="text/css" href="OpenDepositAcc.css">
<title>Open Deposit Account</title>
</head>
<body>
<!--<form method="post" action="OpenDepositAcc.php"> -->
<div class="logo">
<IMG SRC="Logo.png" WIDTH="200" HEIGHT="200"></A>
</div>
<div class="form">
<h2 class="form-heading">Open Deposit Account </h2>
<h2 class="form-heading">Search a Customer account </h2>
<br/>
<?php include "listbox.php"; ?>
<script>
function populate()
{
var sel = document.getElementById("listbox");
var result;
result = sel.options[sel.selectedIndex].value;
var CustomerDetails = result.split(',');
document.getElementById("display").innerHTML = "The details of the
selected person are: " + "<br>Customer ID :" + CustomerDetails[0] + "
<br>First Name :" + CustomerDetails[1] + "<br>Last Name :" +
CustomerDetails[2] + "<br>Date of Birth :" + CustomerDetails[3] + "
<br>Street :" + CustomerDetails[4] + "<br>Town :" + CustomerDetails[5]
+"<br>County :" + CustomerDetails[6] ;
}
<div class="myButton">
<input type="submit" value="Submit" name="submit" onclick="populate()"/>
</script>
<p id ="display"> </p>
</div>
</div>
</form>
</body>
</html>