Jump to content


Photo

Embedded Hyperlinks in Php


  • Please log in to reply
3 replies to this topic

#1 eldredm

eldredm
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 April 2006 - 10:00 AM

Hi there

Newbie with php, I have managed to create hyperlink from my resultset and diplayed it on my page, however, because I am working with frames, how do I get target=mainFrame embedded in my hyperlink.

This is my sample code:
echo "<tr>\n\t<td bgcolor=\"white\">" .
"<b><font color=\"black\">" .
$row["date"] . "<a href=\"viewContents.php?newID=" .
$row["new_id"] ."\">View</a>" ;

where in the syntax do I place : target=mainFrame

Hope someone can help ?

Thanks

#2 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 12 April 2006 - 10:06 AM

echo "<tr>\n\t<td bgcolor=\"white\">" . "<b><font color=\"black\">" . $row["date"] . "<a href=\"viewContents.php?newID=" . $row["new_id"] ."\" target=\"framenamehere\">View</a>";

Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 12 April 2006 - 10:07 AM

Make sure you have given your frame a name then use the target attribute in your anchor tag. like so:
"<a href=\"viewContents.php?newID=" .
$row["new_id"] ."\" target=\"frameNameHere\">View</a>";
Change frameNameHere to the actual name of your frame.

#4 eldredm

eldredm
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 April 2006 - 07:37 PM

Thankyou :) Hyperlink loads the page in the mainframe.



Thanyou:) Mainframe page loads




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users