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

 

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?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.