i have a little problem in my website, i dont know where is the problem. i am create link of other website in my website by using this code

$output .= "<b>Website: </b><a href='".$row["website"]."' target='_blank'>".$row["website"]."</a><br>";

but when i click on a website it does not open website. when i check the browser address it attach my website link before the actual website address.

http://myaddress/$row["website"]

and browser show error page doesnot found

The problem maybe in

".$row["website"]."

it should be something like this

".$row['website']."

However, I just realize that my argument above, may not be feasible. Until, we are sure that the $row['website'] really exist in your database.

What is the value of the column website on your database?

problem is not what you think. my problem is the url of website in href"" is not opened as it is.

assume i want to apen google from my own website than i create a link by this.
<a href="www.google.com">google</a>

Problem is when i click on google, my browser address show
http://mywebsite.com/www.google.com instead of http://www.google.com

In your HTML page, did you define a BASE meta tag ? If so, either remove it, or prepend your links with http://

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.