By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,751 Members | 1,156 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,751 IT Pros & Developers. It's quick & easy.

hyperlink with echo'ed field

P: n/a
The following outputs a filed for the users website, I'm looking for a way
to hyperlink the output so if someone clicks on the link, it will open their
site in new window. Also if the text that is hyperlinked is their actual url
that would be awesome. Thanks in advance. I have been looking all night for
examples and have not nothing that's close to this.
<? echo "$web"; ?>
Jul 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I tried that, and a few other variations, and can't get it to work.

It puts the words of web and a hyperlink, but to a local area on the server
its running, not the url that is stored in the field.

"Ian.H [dS]" <ia*@WINDOZEdigiserv.net> wrote in message
news:qf********************************@4ax.com...

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Fri, 08 Aug 2003 07:26:38 GMT, "entoone"
<en*****@pacbell.net> amazingly managed to produce the following with
their Etch-A-Sketch:
The following outputs a filed for the users website, I'm looking
for a way to hyperlink the output so if someone clicks on the link,
it will open their site in new window. Also if the text that is
hyperlinked is their actual url that would be awesome. Thanks in
advance. I have been looking all night for examples and have not
nothing that's close to this.
<? echo "$web"; ?>

Something like:
echo '<a href="' . $web . '">' . $web . '</a>';
?

Regards,

Ian

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPzOeVmfqtj251CDhEQJbtwCg0gljIWoNpOFJ91iMlQJM79 iAsNcAoOg+
BngxuX7Dq4Z7KAUA1ObJX+J+
=vsY6
-----END PGP SIGNATURE-----

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.

Jul 16 '05 #2

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Fri, 08 Aug 2003 18:52:43 GMT, "entoone"
<en*****@pacbell.net> amazingly managed to produce the following with
their Etch-A-Sketch:
I tried that, and a few other variations, and can't get it to work.
It puts the words of web and a hyperlink, but to a local area on
the server its running, not the url that is stored in the field.

Post your code here.. it'll make life easier for anyone willing to
help to actually help you, as I (and others) could hazard guesses at
your problem, but as shown already, a guess isn't always a solution
=)

I suspect something very simple is amiss somewhere (possibly a mixup
of " with ') but seeing your code should clarify and help us help you
=)

Regards,

Ian

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPzQCGWfqtj251CDhEQI0jgCfY2UnJoS5glsUHXQuH1t1a/Hc2eIAoNKX
L1hxTfG8DwXrjKgYzTF/16Ba
=K0Ig
-----END PGP SIGNATURE-----

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
Jul 16 '05 #3

P: n/a
Thanks again!
This is from the top of the code

where the result is defined

$web=mysql_result($result,$i,"web");

This is the line that prints the result. Presenlty it only prints the url,
but I would like to hyperlink it the actualy url of the site.
<td width="278" height="12" bgcolor="#FFFFFF"><font face="Verdana"
size="2">&nbsp;<? echo "$web"; ?></font></td>
----

"Ian.H [dS]" <ia*@WINDOZEdigiserv.net> wrote in message
news:sd********************************@4ax.com...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Fri, 08 Aug 2003 18:52:43 GMT, "entoone"
<en*****@pacbell.net> amazingly managed to produce the following with
their Etch-A-Sketch:
I tried that, and a few other variations, and can't get it to work.
It puts the words of web and a hyperlink, but to a local area on
the server its running, not the url that is stored in the field.

Post your code here.. it'll make life easier for anyone willing to
help to actually help you, as I (and others) could hazard guesses at
your problem, but as shown already, a guess isn't always a solution
=)

I suspect something very simple is amiss somewhere (possibly a mixup
of " with ') but seeing your code should clarify and help us help you
=)

Regards,

Ian

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPzQCGWfqtj251CDhEQI0jgCfY2UnJoS5glsUHXQuH1t1a/Hc2eIAoNKX
L1hxTfG8DwXrjKgYzTF/16Ba
=K0Ig
-----END PGP SIGNATURE-----

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.

Jul 16 '05 #4

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Sat, 09 Aug 2003 16:01:21 GMT, "entoone"
<en*****@pacbell.net> amazingly managed to produce the following with
their Etch-A-Sketch:
Thanks again!
This is from the top of the code

where the result is defined

$web=mysql_result($result,$i,"web");

This is the line that prints the result. Presenlty it only prints
the url, but I would like to hyperlink it the actualy url of the
site.

By this, would I be right in assuming something like 'www.foo.bar' is
being stored as the URL? If I am...



<td width="278" height="12" bgcolor="#FFFFFF"><font
face="Verdana" size="2">&nbsp;<? echo "$web"; ?></font></td>


<a href="http://<?php echo $web;?>"><?php echo $web;?></a>
should turn that into a usable link =)

If I'm wrong, can you post an example of that's stored in the 'web'
field in your DB?

Regards,

Ian

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPzUboWfqtj251CDhEQITXQCg+n9en8TtIltuCtLnVmSXEy HUgYwAoIqQ
q8YVXz8sMEgsOIipptkZ/5UZ
=lnYq
-----END PGP SIGNATURE-----

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
Jul 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.