Jump to content

need Help with define() please


richarro1234

Recommended Posts

Hello,

 

Im trying to change some info that has been output from the database,

basically its an interview, and i would like to change the color of the names being output from the database using define.

 

<?
session_start();
include("dbconfig.php");
?>
<?
$query = mysql_query("SELECT * from interviews WHERE bid = '".$_GET['id']."'");
while ($b = mysql_fetch_array($query)) {

$intid = $b['id'];
$interview = $b['interview'];
$bandid = $b['bid'];
$location = $b['location'];
$date = $b['date'];
}
define("E.G.G","<font color=\"ff0000\">E.G.G</font>");
?>
<?
include ("header.php");
?>
  <div id="mainCont">
<div id="leftCol">
      <div id="bandinfo">
        <h3>Location: <?=$location?></h3>
        <p><? echo $interview; ?></p>
      </div>
    </div>
    <div id="centrCol">
      <div id="albmBlock">

 

But this doesnt change the color of "E.G.G".

 

Is there away to do this without having to go into phpmyadmin and adding the <font> tage to every name in there as it is quite a long peice of text?

 

Thanks

Rich

Link to comment
Share on other sites

As what he said above, define is for constants. A constant means that it is a variable that is meant to be present throughout the life of the entire website and/or application.  Whereas a variable is normally temporary, a constant is meant to contain data or pieces of data and information that will need to be reused various time within the life cycle of an application.

Link to comment
Share on other sites

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.