FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


href problem in "a" tag





shamil
I have following line in php script
Code:

echo "<a class='content_link_medium' href='$ar[publication_article_url]'>$ar[$publication_title]</a>";


But it ads to href also its own location.
forex:
if you open it from www.qafqaz.edu.az and $ar[publication_article_url] ="www.qafqaz.edu.az/journal";
then it opens http://newsite.qafqaz.local/www.qafqaz.edu.az/journal when you click the link.

how can i fix it?
Stubru Freak
Insert http:// before it
Nyizsa
Stubru Freak wrote:
Insert http:// before it

or use simply "journal" as the value of the variable.
PatTheGreat42
On a side note, is $ar really the best name for an array?
raver
PatTheGreat42 wrote:
On a side note, is $ar really the best name for an array?


no it isn`t Very Happy
It`s not too suggestive and you might get stuck later on when trying to modify your code Wink
shamil
raver wrote:
PatTheGreat42 wrote:
On a side note, is $ar really the best name for an array?


no it isn`t Very Happy
It`s not too suggestive and you might get stuck later on when trying to modify your code Wink


True it is not useful to name variables randomly. This is my bad habit. I hurry to see the result when writing code. Wink

As guys wrote the answer
I omitted http:// at the begining of href.
Related topics
Adding Music or Sound to Your WebsitE
Webpage Display Problem
can you help me?
How do I customize the target="blank" stuff...?
ASP Problem
Problem with google discription for [url]http://www.poxyprox
CSS div alignment issue, IE and FF (newbie problem)
Problems with my coding... again
How do i make "_derived/nortbots.htm"??
PHP next step
html formu iin yardm?
CSS Class problem SOLVED
IE6 Problem with font size CSS and mouseover
problem with <ul> navigation
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.