Page 1 of 1

Why host address generated by PHP?

Posted: Thu Aug 15, 2002 4:26 am
by Grizou
Since I'm new to PHP/MySQL programming, this may be a stupid question... but I still need to find the answer since there are no books that can help me.

Do you know why, whenever a link to an outside website is created from inside PHP, it includes automaticaly the address of http://mydomainname.net/ (let's pretend it's my domain name) before?

For example, a user registers his website in my USERS's database (let's pretend it's http://userdomainname.net/) . When I create a PHP page that would create a hyperlink to that website, if I click on that hyperlink it will automatically generate this address: http://mydomainname.net/http://userdomainname.net/ (inserting my website's address before the user's website address)

Is there some kind of configuration that should be modified on the MySQL or PHP server?

Thank you for your help.

Grizou

Posted: Thu Aug 15, 2002 5:11 am
by twigletmac
I don't think it's a configuration error, it's more likely to be something that's going a bit screwy in the code. Could you post the script that creates the link so we can help you a bit better.

Mac

Posted: Thu Aug 15, 2002 8:12 am
by MattF
Sometimes if you don't include http:// on the front of a link the browser assumes it is a local link, for example if I link to http://www.msn.com from http://www.mysite.com the browser will load http://www.mysite.com/www.msn.com get it?