Hi,
I have a site where we have a "view this site in Welsh" and "view this site in English" button.
the URLs look something like this
English site http://www.x.com/products.php
Welsh site http://www.x.com/cymraeg/products.php
When in the English site, I have it coded as
<a href=<? echo "http://www.mtib.co.uk/cymraeg" . $_SERVER['SCRIPT_NAME'] . "" ?> title="Welsh"><img src="design/cy.gif"></a>
In the Welsh site, I have:
<a href=<? echo "http://www.mtib.co.uk/" . $_SERVER['SCRIPT_NAME'] . "" ?> title="English"><img src="design/en.gif"></a>
But the $_SERVER['SCRIPT_NAME'] carries the path information too, which means I have "/cymraeg/products.php" , when I need just "/products.php"
without trimming it as a string and the rest of it, what is the correct way of doing it?
All help is greatly appreciated.
Ade