yes is working as you suggested, thank you very much. i will take your suggestion about removing the wildcard, i think this will result in a much faster search. i am having the issue with if there is only one return from the query and i ask for the [2] value, (which in some cases thereis not, though in other cases there may be 15) then it errors. can you better explain how to prevent this error.
another thing i should mention is that the $brand[1] results are being diplayed in a variable that is the message part of a mail() function, so to my knowlege i can not but the loop in the mail finction variable. below is my whole code for the section. thanks again for help-in this newbie out.
flashgroover
$result2 = mysql_query("SELECT * FROM watch_list WHERE whatsession LIKE '%".$session."%' ",$db) or die("error with the sql statement 2");
$i = 1;
while ($watch_list = mysql_fetch_row($result2)) {
$brand[$i] = $watch_list[1];
$i++;
}
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: sales@watchsolution.com\r\n";
$headers .= "Reply-To: sales@watchsolution.com\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
$mailfrom = 'buyer: '.$name;
$message = "
This person has continued to the World Pay server. <p>
name: $name<p>
address: $address<p>
country: $country<p>
telephone: $telephone<p>
email: $email<p>
sessionID: $session2<p>
watch total: \$$totals<p>
shipping total: \$$shippingcost<p>
international total: \$$internationaltotal<p>
----------------------------------------------------------------<p>
grandtotal: \$$grandtotal2<p>
$brand[1]
$brand[2]
$brand[3]
";
$subject = $name. ' has purchased watches.';
$mailto = 'cesar@pacevideo.com';
mail($mailto, $subject, $message, $headers);