I have website in php and i want to integrate into my website another website which will take care free email accounts on my server. In my index.php in document root i have simple if statements that include certain files depending on click. Then all the scripts for the mail proogram are in document_root/mail . Also, i want that mail program to open up in my website sort of. What happens is that when i click on the link on the main page that links me to document_root/mail the mail program doesnt start because all the paths are not related to mail folder but they are with respect to document_root. I went through my all the apache error log and corrected all of the paths but its still not working. This is the piece of if statement for document_root/index.php
What can i do in order to have mail/index.php when its loaded use mail as its root ???