Forum Moderators: coopster
Here is the code I've been using, though I did change it a few times but it always gave the same results :
----
echo "<a href=\"".$url."\"><img src=\"http://www.mydomain.com/images/".$title1."_logo.gif\" alt=\"Website of $title1.\" /></a>";
----
This shows the banner with a link in it, but the problem is that the link it gives is : www.mydomain.com/urlvariable instead of the proper url. This seems like such an easy thing to fix but I can't figure it out.
Any help, please?
Would be very appreciated.
Anyone else has an idea? I guess I can work around it by adding each url manually but it seems silly since I'm reading the database to get those websites' info anyway..
[edited by: dreamcatcher at 7:40 am (utc) on Sep. 23, 2007]
[edit reason] Use example.com, thanks. [/edit]
you're getting
http:// mydomain.com/urlvariable
?
If that's true, then it sounds like you're using a relative url, and your browser is adding the domain for you.
If you want to point to some other domain, you need to supply an absolute url:
$url='http://otherdomain.com/urlvariable";
echo "<a href=\"".$url."\">. . . . .
Am I still way off?