Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Master Detail pages php/mysql Links

Guest
Jul 19, 2006 Jul 19, 2006
I have a master/detail page setup that is working properly. I am trying ot add a Link to only a few of the detaill pages but not to show up on others. I tried to set just do the html in a text field but It owuld not come out as link. It did underline it like a link.
I also tried to do a If statement but am getting parse errors when I add the html code.
<? if ($row_detail['link'] {
echo "<a herf=$row_detail['link']>Expanded Detail</a>

I get a parse error of unexpected <
Any body have any idea if this is possible and how I might get it to work
Thanks
Tim
TOPICS
Server side applications
598
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 20, 2006 Jul 20, 2006
Tim RE wrote:
> David
> Getting closer I put in this
> <? if ($row_rscdetail['link']) {
> echo "<a herf='{$row_rscdetail['link']}'>Expanded Detail</a>"; } ?>
> Everything is good except it is not a link. It is underlined and mouses over
> but not link.

It's href, NOT herf. Since you have misspelled it every single time in
both this post and your original one, that is almost certainly the
reason it's not creating a link.

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends o...
Translate
LEGEND ,
Jul 19, 2006 Jul 19, 2006
Tim RE wrote:
> <? if ($row_detail['link'] {
> echo "<a herf=$row_detail['link']>Expanded Detail</a>
>
> I get a parse error of unexpected <

You need to surround the PHP variable in curly braces because it
contains an associative array element:

echo "<a href='{$row_detail['link']}'>Expanded Detail</a>";

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 19, 2006 Jul 19, 2006
David
Getting closer I put in this
<? if ($row_rscdetail['link']) {
echo "<a herf='{$row_rscdetail['link']}'>Expanded Detail</a>"; } ?>
Everything is good except it is not a link. It is underlined and mouses over but not link.

The source code from ie is
<a herf=' http://www.sflcondos.com'>Expanded Detail</a>
I also put the " " around the link in the table field and removed the ' ' from <a herf='{etc}' and it came out in source code as
<a herf=" http://www.sflcondos.com">Expanded Detail</a>

It has got me stumped
Thanks for your help
Tim
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 20, 2006 Jul 20, 2006
Tim RE wrote:
> David
> Getting closer I put in this
> <? if ($row_rscdetail['link']) {
> echo "<a herf='{$row_rscdetail['link']}'>Expanded Detail</a>"; } ?>
> Everything is good except it is not a link. It is underlined and mouses over
> but not link.

It's href, NOT herf. Since you have misspelled it every single time in
both this post and your original one, that is almost certainly the
reason it's not creating a link.

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 20, 2006 Jul 20, 2006
David
Looks like I need to get my eyes checked again.
Thank you so much . I spent too much time staring at that and just didn't catch it.
Have a good one
Tim
I'll buy your book for the help (-:
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 20, 2006 Jul 20, 2006
LATEST
Tim RE wrote:
> David
> Looks like I need to get my eyes checked again.
> Thank you so much . I spent too much time staring at that and just didn't catch it.
> Have a good one
> Tim
> I'll buy your book for the help (-:

Glad to have been of help, Tim. No obligation to buy the book, but I'll
be delighted if you do. Hope you enjoy it.

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines