britt15 Posted March 15, 2006 Share Posted March 15, 2006 I'm trying to make the title and date text in the following link bold. How do I do this? It is part of a blog script.[a href=\"http://www.tainted-rose.com/blog/display.php\" target=\"_blank\"]http://www.tainted-rose.com/blog/display.php[/a][code]<? include("http://www.tainted-rose.com/header.php")?><?php // Put database connection variables here $hostname="localhost"; $user=""; //user name to access database $pass= ""; //password $dbase=""; //database name $connection = mysql_connect("$hostname" , "$user" , "$pass") or die ("Cannot connect to MySQL"); $db = mysql_select_db($dbase , $connection) or die ("Cannot select database."); $q = "SELECT * from blog order by date desc "; $result= mysql_query($q, $connection) or die ("Could not execute query : $q." . mysql_error()); // dynamic navigation variables $rows_per_page=1; // adjust the number here to display number of entries per page $total_records=mysql_num_rows($result); $pages = ceil($total_records / $rows_per_page); $screen = $_GET["screen"]; if (!isset($screen)) $screen=0; $start = $screen * $rows_per_page; $q .= "LIMIT $start, $rows_per_page"; $result= mysql_query($q, $connection) or die ("Could not execute query : $q." . mysql_error()); while ($row=mysql_fetch_array($result)) { $id=$row["id"]; $name=$row["name"]; $email=$row["email"]; $entry=$row["entry"]; $date=$row["date"]; $icon=$row["icon"]; $title=$row["$title"]; ?> <table width="80%" border="0" cellspacing="1" cellpadding="0"> <tr> <td><?php echo "$title"; ?></td> </tr> <tr> <td> <p><img src="<?php echo "$icon"; ?>" alt="icon" align="center"><?php echo "$entry"; ?></p> <p>Posted by <a href="mailto:<?php echo "$email"; ?>"><?php echo "$name"; ?> on <?php echo "$date"; ?>.</p> </td> </tr> </table> <p align="right"> <?php $query = "select id from blog_comments where blog_id='$id' "; $ret = mysql_query($query) or die (mysql_error()); $comment_num = mysql_num_rows($ret); // display number of comments echo "<a href=\"http://www.tainted-rose.com/blog/readcomments.php?id=$id\">$comment_num</a>"; ?> </p> <?php } #while ?> <div align=center> <?php // Display dynamic navigation here // create the dynamic links if ($screen > 0) { $j = $screen - 1; $url = "display.php?screen=$j"; echo "<a href=\"$url\">Prev</a>"; } // page numbering links now for ($i = 0; $i < $pages; $i++) { $url = "display.php?screen=" . $i; $j = $i + 1; echo " | <a href=\"$url\">$j</a> | "; } if ($screen < $pages-1) { $j = $screen + 1; $url = "display.php?screen=$j"; echo "<a href=\"$url\">Next</a>"; } ?> </div> <? include("http://www.tainted-rose.com/footer.php")?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/5018-mixinf-html-with-php/ Share on other sites More sharing options...
lessthanthree Posted March 15, 2006 Share Posted March 15, 2006 Lots of options:[code]<td><b><?php echo $title; ?></b></td><td style='font-weight:bold;'><?php echo $title; ?></td><td class='bold'><?php echo $title; ?></td> <!--obviously you would need a css class for this one-->[/code]Just a few ways among many others. Quote Link to comment https://forums.phpfreaks.com/topic/5018-mixinf-html-with-php/#findComment-17753 Share on other sites More sharing options...
britt15 Posted March 15, 2006 Author Share Posted March 15, 2006 Didn't work. I used your second bit of code. Quote Link to comment https://forums.phpfreaks.com/topic/5018-mixinf-html-with-php/#findComment-17755 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.