val converting to int value
<p>hello i have a form that converts decimal points to whole numbers.where could there be a problem</p>

<pre><code> &lt;td&gt;
    &lt;input type='text' name='item[$i][Price]' id='Pquantity' value='".htmlspecialchars($row['Price'])."' readonly&gt;
</code></pre>

<p>this is the form below, the data is beign pulled from a form filled above it </p>

<pre><code>&lt;?php
$submit = $_POST['Add'];

//form data
$Sname = mysql_real_escape_string(htmlentities(strip_tags($_POST['Sname'])));
$Pname = mysql_real_escape_string(htmlentities(strip_tags($_POST['Pname'])));
$Pidno = mysql_real_escape_string(htmlentities(strip_tags($_POST['Pidno'])));
$Psize = mysql_real_escape_string(htmlentities(strip_tags($_POST['Psize'])));
$Pcolour = mysql_real_escape_string(htmlentities(strip_tags($_POST['Pcolour'])));
$Pquantity = $_POST['Pquantity'];
$Weblink = mysql_real_escape_string(htmlentities(strip_tags($_POST['Weblink'])));
$Price = mysql_real_escape_string(htmlentities(strip_tags($_POST['Price'])));
$date = date("Y-m-d");


//echo " ('','$Sname','$Pname','$Pidno','$Psize','$Pcolour','$Pquantity','$Weblink','$Price','$Uname')";
if('POST' === $_SERVER['REQUEST_METHOD']) 

{
if ($Sname&amp;&amp;$Pname&amp;&amp;$Pidno&amp;&amp;$Weblink&amp;&amp;$Price)
{
if (is_numeric($Price))
{
    $repeatheck = mysql_query("SELECT * FROM repplac WHERE Uname = '{$_SESSION['username']}' AND Pidno ='$Pidno' AND Sname='$Sname'");
    $count = mysql_num_rows($repeatheck);
if($count!=0)
{
    die ('PRODUCT ALREADY IN BASKET YOU CAN INCREASE OR DECREASE QUANTITY');
}
else
//echo'$Price';
$tprice = $Price * $Pquantity;
//echo"$tprice";
$queryreg = mysql_query("
INSERT INTO repplac VALUES ('','$Sname','$Pname','$Pidno','$Psize','$Pcolour','$Pquantity','$Weblink','$Price','$tprice','$date','{$_SESSION['username']}','')
")or die(mysql_error());
}
else
echo 'price field requires numbers';
}
else
echo 'please fill in all required * fields ';
}
?&gt;
&lt;form action='youraccount.php' method='Post' class='ilistbar'&gt;
    &lt;!--&lt;div&gt;
    &lt;label for='shoppinglist' class='fixedwidth'&gt;&lt;/label&gt;
    &lt;textarea type='text' name='shoppinglist' id='username' cols='100' rows='15'&gt;&lt;/textarea&gt;
    &lt;/div&gt; --&gt;
    &lt;div&gt;
    &lt;label for='Sname' class='fixedwidth'&gt; * Shop name&lt;/label&gt;
    &lt;input type='text' name='Sname' id='Sname'/&gt;
    &lt;/div&gt;
    &lt;div&gt;
    &lt;label for='Pname' class='fixedwidth'&gt; * Product name&lt;/label&gt;
    &lt;input type='text' name='Pname' id='Pname'/&gt;
    &lt;/div&gt;
    &lt;div&gt;
    &lt;label for='Pidno' class='fixedwidth'&gt; * Product id no /ad reference&lt;/label&gt;
    &lt;input type='text' name='Pidno' id='Pidno'/&gt;
    &lt;/div&gt;
    &lt;div&gt;
    &lt;label for='Psize' class='fixedwidth'&gt;Product size&lt;/label&gt;
    &lt;input type='text' name='Psize' id='Psize'/&gt;
    &lt;/div&gt;
    &lt;div&gt;
    &lt;label for='Pcolour' class='fixedwidth'&gt;Product colour&lt;/label&gt;
    &lt;input type='text' name='Pcolour' id='Pcolour'/&gt;
    &lt;/div&gt;
    &lt;div&gt;
    &lt;label for='Pquantity' class='fixedwidth'&gt;Product quantity&lt;/label&gt;
    &lt;select name="Pquantity" id="Pquantity"&gt;
      &lt;option value="1"&gt;1&lt;/option&gt;
      &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;option value="3"&gt;3&lt;/option&gt;
      &lt;option value="4"&gt;4&lt;/option&gt;
      &lt;option value="5"&gt;5&lt;/option&gt;
      &lt;option value="6"&gt;6&lt;/option&gt;
      &lt;option value="7"&gt;7&lt;/option&gt;
      &lt;option value="8"&gt;8&lt;/option&gt;
      &lt;option value="9"&gt;9&lt;/option&gt;
      &lt;option value="10"&gt;10&lt;/option&gt; 
&lt;/select&gt;
(You can update quantity in excess of 10 on the shopping list below)
    &lt;/div&gt;
    &lt;div&gt;
    &lt;label for='Weblink' class='fixedwidth'&gt; * Web link&lt;/label&gt;
    &lt;input type='text' name='Weblink' id='Weblink'/&gt;
    &lt;/div&gt;
    &lt;div&gt;
    &lt;label for='Price' class='fixedwidth'&gt; * Price GBP&lt;/label&gt;
    &lt;input type='text' name='Price' id='Price'/&gt;
    &lt;/div&gt;
    &lt;div&gt;

    &lt;div class='buttonarea'&gt;
            &lt;p&gt;
            &lt;input type='submit' name='submit' value='Add'&gt;
            &lt;/p&gt;
            &lt;/div&gt;
            &lt;/p&gt;
    &lt;/form&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="primary"&gt;
&lt;div class="action-box rounded"&gt;
&lt;div class="titlebar"&gt;
&lt;h2&gt;Shopping List&lt;/h2&gt;
&lt;!--&lt;a href='totalprice.php'&gt;Update&lt;/a&gt;--&gt;
&lt;/div&gt;
&lt;div class="listbar"&gt;

    &lt;form action='orderpplac.php' method='Post' class='shlistbar'&gt;
    &lt;table border='1'&gt;
    &lt;tr&gt;
    &lt;th&gt;SHOP NAME&lt;/th&gt;
    &lt;th&gt;PRODUCT NAME&lt;/th&gt;
    &lt;th&gt;PRODUCT SIZE&lt;/th&gt;
    &lt;th&gt;PRODUCT COLOUR&lt;/th&gt;
    &lt;th&gt;PRODUCT QUANTITY&lt;/th&gt;
    &lt;th&gt;PRICE&lt;/th&gt;
    &lt;th&gt;TOTAL&lt;/th&gt;
    &lt;th&gt;&lt;/th&gt;
    &lt;/tr&gt;
    &lt;?php
    // Get DB results and loop, outputting table rows with counter
    $pplresult = mysql_query("SELECT * FROM repplac WHERE Uname = '{$_SESSION['username']}'") or die(mysql_error());
   for ($i = 0; $row = mysql_fetch_assoc($pplresult); $i++) {
    echo "
    &lt;tr&gt;
    &lt;td&gt;".htmlspecialchars($row['Sname'])."&lt;/td&gt;
    &lt;td&gt;".htmlspecialchars($row['Pname'])."&lt;/td&gt;
    &lt;td&gt;".htmlspecialchars($row['Psize'])."&lt;/td&gt;
    &lt;td&gt;".htmlspecialchars($row['Pcolour'])."&lt;/td&gt;
    &lt;td&gt;
    &lt;input type='text' name='item[$i][Pquantity]' id='Pquantity' value='".htmlspecialchars($row['Pquantity'])."' /&gt;
    &lt;input type='hidden' name='item[$i][Pidno]' id='Pidno' value='".htmlspecialchars($row['Pidno'])."' /&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;input type='text' name='item[$i][Price]' id='Pquantity' value='".htmlspecialchars($row['Price'])."' readonly&gt;
    &lt;/td&gt;
    &lt;td&gt;".htmlspecialchars($row['Tprice'])."&lt;/td&gt;
    &lt;td&gt;&lt;a href='deleteproduct.php?del=".htmlspecialchars($row['Pidno'])."'&gt;delete&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;";
    }
   $pplresult = mysql_query("SELECT * FROM repplac WHERE Uname = '{$_SESSION['username']}'") or die(mysql_error());
  while ($row = mysql_fetch_assoc($pplresult)) 
   //echo $row['Pquantity'] * $row['Price'];
  {
  $totalprice += $row['Tprice'];
  }
  //echo "$totalprice";

         ?&gt;
         &lt;tr&gt;
                &lt;th&gt;Total Price&lt;/th&gt;
                &lt;th&gt;&lt;?php echo $totalprice; ?&gt;&lt;/th&gt;

            &lt;/tr&gt;
    &lt;!--Close table and form--&gt;

    &lt;/table&gt;
    &lt;input type='submit' name='submit1' value='UPDATE' /&gt;
    &lt;input type='submit' name='submit2' value='SUBMIT' /&gt;
    &lt;/form&gt;
</code></pre>
