Displaying POST variables from a Form

Hi everyone! I really need some help on this.

I have a form that pulls product data from a MySQL db to use. I also have two input fields for the user to enter “percent price markup” or “manual price markup” that I will need to calculate the new price.

Here is the form, but I don’t know how to output all of the variables in a table:
[php]

Untitled Document <?php require("constants.php");

$query=“SELECT * FROM products”;
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();

echo “Database Output

”;

$i=0;
while ($i < $num) {

$id=mysql_result($result,$i,“id”);
$product=mysql_result($result,$i,“product”);
$description=mysql_result($result,$i,“description”);
$pcategory=mysql_result($result,$i,“pcategory”);
$image_big=mysql_result($result,$i,“image_big”);
$image_thumb=mysql_result($result,$i,“image_thumb”);
$price=mysql_result($result,$i,“price”);
$price=number_format($price, 2, ‘.’, ‘’);
echo "






";

$i++;
}

?>

Image Name Cost Markup
(%)
Manual
<a href=“images/$image_big” rel=“lightbox”><img src=“thumbs/$image_thumb” width=“129” height=“83” /> $product
$description
<input type=“hidden” name=“price $id” value="$price" />$$price <input type=“text” name=“markup$id” /> <input type=“text” name=“manual$id” />
[/php]

I am new to PHP and am learning as fast as possible, but I need to complete this project as soon as possible.

Thanks!

Sponsor our Newsletter | Privacy Policy | Terms of Service