thanks for the help i tried both and they all worked fine.
now my problem is. when i click that link that i made, it goes to like a yahoo search page and it seems like the page does not exist. but when i copy and paste it to my address bar, it worked. i have implemented a restrict page access to that page, user should be logged in first to see that page.