Jump to content

making TD value BOLD


phppup

Recommended Posts

use css

<head>
<style type="text/css">
input #bold {
font-weight: bold;
}
</style>
<?php
do database query get results

?>
</head>
<form>
<?php while($result=mysql_fetch_array($query)) {
$value=result["somerow"];
if ($value>o) { echo "Some field name <input name='data' type='text' id='bold' value='$value' /><br/>"; }
  else
{ echo "Some field name <input name='data' type='text' value='$value' /><br/>"; }
}
?>
</form>

as an example

 

Link to comment
Share on other sites

The items in the form are each genreated by a line like this:

 

echo  "".$row['ITEM1']."";

 

There many items.  Some are zero, some are greater.

 

Is there a tool (like *) that I can use with a > function for the entire form, or do i need to apply the form for every item individually?

Link to comment
Share on other sites

Each row contains quantities from a form.

I then ECHO the form after submission and ECHO the values.

I would like all values >0 to be BOLD.

 

while($result=mysql_fetch_array($query)) {$value=result["somerow"];

if ($value>o) {

echo "Some field name <input name='data' type='text' id='bold' value='$value' /><br/>";

}  else{ echo "Some field name <input name='data' type='text' value='$value' /><br/>"; }}

 

the above codeseems promising, but I'm not sure how to LOOP it so it evaluates ALL the values in their fields, or if there might be a better method.

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.