Jump to content

Recommended Posts

I have the following code and I would like the title to be a link not only the "Read.." section but I can't seem to get it work. Is it doable? Thank you in advance!

{
echo "<b>";
printf($therow["title"]);
echo "</b><br><i>";
printf($therow["date"]);
echo "</i><br>";
printf($therow["summary"]);
echo "<br><a href=\"$PHP_SELF?id=";
printf($therow["id"]);
echo "\">Read</a>...";
echo "<br><br>";
}
Link to comment
https://forums.phpfreaks.com/topic/10814-help-with-this-code-making-title-a-link/
Share on other sites

Thank you for such a prompt asnwer!

I'm sorry for not being too detailed, I'm really clueless with PhP. I wanted the title to have the same link as the "Read.." Is that what the code you just gave me will do? The title is a title of an article.

Thank you!
[!--quoteo(post=379226:date=Jun 1 2006, 10:16 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Jun 1 2006, 10:16 PM) [snapback]379226[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'd need to know how this title is stored in the database or whatever it is its storing method to give you an answer.

Anyways... To change it's color, you must use normal HTML/CSS, like:

<a style="color: white"...
[/quote]

The code for title that you gave me works very nicely, it displays exactly what I wanted. As to the color, can I use the folowing? (I would like to use a color numbe #660000)

echo "<a style="color: #660000" href='$PHP_SELF?id=$therow[id]'>Read $therow[title]</a>...";

Thank you so much for your help!
[code]"<a style=\"color: #660000\" href='$PHP_SELF?id=$therow[id]'>Read $therow[title]</a>...";[/code]

to

[code]"<a style=\"color: #660000; font-size: 15pt\" href='$PHP_SELF?id=$therow[id]'>Read $therow[title]</a>...";[/code]

Will set the font-size to 15pt
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.