Im trying to make a datalist which will have the options as:
ItemCode - Name
Code and Name are in the same table but are in different columns
Ive got it working for just code:
<?php
while($res=mysql_fetch_row($code))
{
$fullname=$res[0];
echo "<option value=$fullname></option>";
}
?>
I tried doing the following for both:
<?php
while(($res=mysql_fetch_row($code)) && ($res2=mysql_fetch_row($name)))
{
$fullname=$res[0]." - ".$res2[0];
echo "<option value=$fullname></option>";
}
?>
However I had no joy, any help would be greatly appreciated.