SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2002
    Location
    Cambrige, MA
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Formating Results

    I was wondering if anyone could fill me in on how I can get the results of this query to be "bold".

    Here is my script so far however, I cannot get the results to printout in bold on the screen.

    **************************

    <td colspan=2 bgcolor="#E6E6E6" align="right">
    <?PHP
    include("secure/conf.php");

    $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect to database at this time");
    mysql_select_db($db, $connection) or die ("Unable to Connect to Database at this time");
    $result = mysql_query("SELECT menu_id FROM 3d_menu_items", $connection);
    while (($row = mysql_fetch_array($result))) {
    ?>

    <b><font face="microsoft sans serif" color="#ffffff" size=1>
    <a href="continue.php?menu_id=<? echo $row->menu_id; ?>">
    <? echo $row["menu_id"]; ?>&nbsp;|</a></font></b>
    <?
    }

    ?>
    </td>

    *******************

    Thank you for your thoughts.


    Sincerely,

    Tim
    "Bound only by the limitations of your imagination"

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use this:
    PHP Code:
    <td colspan="2" bgcolor="#e6e6e6" align="right">
    <?php
    include('secure/conf.php');
    $connection=mysql_connect($host,$user,$pass)
        or die(
    'Unable to connect to database at this time');
    mysql_select_db($db,$connection)
        or die(
    'Unable to Connect to Database at this time');
    $result=mysql_query("SELECT menu_id FROM 3d_menu_items",$connection);
    while(
    $row=mysql_fetch_array($result)){
        
    ?>
        <span style="font-family : microsoft sans serif ; font-weight : bold ; font-size : 9pt ;">
        <a href="continue.php?menu_id=<?php echo($row->menu_id); ?>">
        <?php echo($row['menu_id']); ?> |</a></span>
        <?
    }
    ?> 
    </td>
    There are a few PHP modifications (double to single quotes, etc.) but nothing that would alter the way your script functions on the user-end.

    The primary difference is that it uses CSS instead of the depreciated HTML tags you used before. That should take care of your problem.

    If it does not, check to make sure you're not using some other CSS on your site that defines the styles of links -- if that is the case then the span element surrounding the link will usually become defunct.

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •