You are here: Re: script to generate an external link « PHP Programming Language « IT news, forums, messages
Re: script to generate an external link

Posted by Steve Belanger on 05/28/07 20:16

you could have the users put the http:// inside their links, or manually
adding it in the code before you place the link value inside the href
attribute of the link tag.


<info@musiclanerecording.com> wrote in message
news:1180382783.518274.319420@k79g2000hse.googlegroups.com...
> hello all, if anyone out there could help me i would really appreciate
> it. i am very much a novice coder. I have a site we are building and
> we have created a section in the admin area to allow the client to add
> external links to their web site. the problem we keep running into is
> the links that get generated have the home page url in front.
>
> ie. lets say the web site address is http://abc.com and i create an
> external link called xyz. the url i put in the link generator is
> www.xyz.com
> but what happens is the script spits out a link with this url:
> http://abc.com/xyz.com.
>
> below is the script:
>
> //include external links
> $query = "SELECT LINK_HREF, LINK_NAME
> FROM LINK";
>
> $lresult = mysql_query($query);
>
> if (mysql_num_rows($lresult) == 0)
> {
> echo 'Verses being update.';
> }
> else
> {
> while ($row = mysql_fetch_array($lresult, MYSQL_ASSOC))
> {
> print "{$trOpen}" . "<a href=\"{$row['LINK_HREF']}\">" .
> "{$row['LINK_NAME']}" . "</a>" . "{$trClose}";
> }
> }
>
> If anyone could help i would be very grateful
>
> God bless
> jason
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация