Results 1 to 2 of 2

Thread: how i change the font

  1. #1
    Join Date
    Aug 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how i change the font

    hi how i change the font , color and size of table of the table text this is my code
    Code:
    <?php
    $con = mysql_connect("localhost","apnimusk","password");
    if (!$con){
    
    	
    
    die('Could not connect: ' . mysql_error());
    }
    
    mysql_select_db("apnimusk_other", $con);
    if(isset($_GET['id']) && is_numeric($_GET['id'])){
    
    	
    
    $result = mysql_query("SELECT * FROM `joke` WHERE `id` = '".$_GET['id']."'");
    
    	
    
    echo "<table border='1'>
    
    	
    
    <tr>
    
    	
    	
    
    </tr>";
    	
    
    while($row = mysql_fetch_array($result)){
    
    	
    
    	
    
    echo "<tr>";
    
    	
    
    	
    
    echo "<td>" . $row['name'] . "</td>";	
    
    	
    
    echo "</tr>";
    
    
    echo "<tr>";
    
    	
    
    	
    echo "<td>" . $row['text'] . "</td>";
    
    	
    
    	
    
    echo "</tr>";
    	
    
    }
    
    	
    
    echo "</table>";
    }else{
    
    	
    
    $result = mysql_query("SELECT * FROM `jokes`");
    
    	
    
    echo "<table border='1'>
    
    	
    
    <tr>
    
    	
    
    <th>Jokes</th>
    
    	
    </tr>";
    
    	
    
    while($row = mysql_fetch_array($result)){
    
    	
    
    	
    
    echo "<tr>";
    
    	
    
    	
    	
    
    	
    
    echo "<td>" ."<a href='?id=".$row['id']."'>".$row['name']."</a>" . "</td>";
    
    	
    
    	
    
    echo "</tr>";
    
    	
    
    }
    
    	
    
    echo "</table>";
    }
    mysql_close($con);
    ?>

  2. #2
    Join Date
    Nov 2007
    Location
    USA
    Posts
    170
    Thanks
    8
    Thanked 22 Times in 22 Posts

    Default

    Ok to start off I'll let you know that I am IN NO WAY A PHP EXPERT! I'm sure if I am wrong here that someone else will come along and provide you the correct solution....teaching you and me both. But with my experience of using PHP my guess to fix this would just be to supply CSS styles to the elements you want to change the font-style of...

    try that out and see if it works, which to my best knowledge, should.

    Hope this helps! (Sorry if it doesnt...)

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
  •