Vincent Thanks For Your Help!
I just came back from my Spring Vacation, and I didn't get a chance to check the forum or my e-mail until today. Can you or someone else help me with one more piece of the coding - using number_format($charge,2); to set the decimal places to only 2 values (###.12).
Here is what I got now (Take a look at the //// comment statements below:
case 0:
$charge=(1 + ($percent/100));
//// How can I set the decimal places to 2, right now I //// get the price and four decimal values after the price (###.1234) I've use //// 'number_format($cost,2);' to fix this problem but I can't use it with the //// current setup.
//// This is one of the things I've Tried and It Does Not Seem To Work:
//// $charge=number_format((1 + ($percent/100)),2);
//Set Add Percentage & Round
$query = "SELECT descr, cost*$charge as newcost, part_num, vend_code, manu_part FROM products WHERE UPPER(descr) LIKE '%$input%'";
if ($result = mysql_query ("$query")) {
while ($row = mysql_fetch_array ($result))
{
echo "<U>Product Description:</U> ".$row[descr]."<br><U>Manufactuer:</U> ".$row[vend_code]."<br><U>Manufactuer Part Number:</U> ".$row[manu_part]."<br><U>Our Part Number:</U> ".$row[part_num]."<br><U>Our Price:</U> ".$row[newcost]."<br><br>";
}
}
break;