Thanks for your reply, but unless I am doing something else wrong it is still not working. I am getting a parse error.
One other this, I dont want it to search the database for whats in PREF1, and then add to its contents ".html" so i can use it in a incluude statement.
I thought this would work:
$RESULT=(select * from USERS where USER_NAME=$USER_NAME)
include ("$RESULT".htm)l