How can I filter POST numeric values in php?
<p>Numeric values..</p>

<pre><code>$price = $_POST['price'];
$zipcode = $_POST['zipcode'];
</code></pre>

<p>How can I filter two fields passing through a single select tag field called category_id that uses the explode() to recieve the values from this  category_id field.</p>

<p>Form </p>

<pre><code>    &lt;?php echo '&lt;label for="Category"&gt;Category:&lt;/label&gt;
&lt;select name="category_id" size="1" &gt;&lt;br /&gt;';


$sql = "SELECT id, name FROM category ORDER BY name";

$rs = mysql_query($sql);

while($row = mysql_fetch_array($rs))
{
echo "&lt;option value=\"".$row['name']."$".$row['id']."\"&gt;".$row['name']."&lt;/option&gt;\n  ";
}


echo '&lt;/select&gt;';
</code></pre>

<p>the way I receive the category_id field with explode but don't know how to filter it since it is a numeric and data field at the same time.</p>

<pre><code>$option = explode("$", $_POST['category_id']); 

enter code here
</code></pre>
