i tried that earlier, but i think it has been my problem to not diagnose the problem. until i have added print "Content-type: text/html\n\n" and print to rest to the top of script and am getting the results the actual results i want in header. but not in html. in html am just getting only 1 results