Hi all, i manage to write this query to select data from 2 different tables, here is it

$query ="SELECT * FROM illness,symptoms  WHERE symptoms.sympId =  illness.illId";

am trying to echo the result of the query, here is my script

if($med == !'')

{
    $query ="SELECT * FROM symptoms,illness WHERE symptoms.sympId = illness.illId";

    $rs = mysql_query($query);
    while($row = mysql_fetch_assoc($rs)) 

    {
        $name = $row['name'];

        $msg=urlencode($name);
        $msg = urldecode($msg);

        echo "$msg".',';
    }
}

when i run this,it select every thing from the,

symptoms

table, any good ideas will do.Thanks.