thanks weedpacket - am I dumb or what !!?!
never mind, this has resolved the parse error, but the code doesn't quite do what I was wanting.
the output in the drop down menu just says 'choose' (the option I set up in the code) it doesn't display the array information from the query.
The query to define the array is as follows;
$query = "SELECT `CompanyRef` FROM `tblUser` WHERE `CLogIn` = '$username'";
$result = mysql_query($query)
or die(mysql_error());
$row = mysql_fetch_array($result);
$Company = $row["CompanyRef"];
$query = "SELECT `CoName` FROM `tblClient` WHERE `CompanyRef` = '$Company' ";
$result1 = mysql_query($query)
or die(mysql_error());
$row1 = mysql_fetch_array($result1);
$CoName = $row1["CoName"];
($username comes as a variable from the login page)
I know that there are 2 values in the array created by this query - ie 2 CoName's - and I wanted these 2 values (or however many there are in the array) to be shown in the drop down menu, but this isn't happening.
What do I need to do with this code;
<TD WIDTH="50%" HEIGHT="32"><FONT FACE="Arial, Helvetica, sans-serif">Client:</FONT></TD>
<TD WIDTH="50%"><FONT FACE="Arial, Helvetica, sans-serif">
<?php
echo '<select name="client">
<option selected>choose</option> ' ;
foreach($CoName as $value){
printf("<option>".$value."</option>");
}
echo '</select>'?>
</FONT></TD><TR>
to make this happen
thanks