Thanks ray I am including my ASP code which I have converted but is not working
the way I want it to....
if categoryid = "all" Then
sql = "SELECT * FROM products where shopinspection= "& shopinspection &""
Else
'sql = "SELECT * FROM products where categoryid = "& categoryid &""
sql = "SELECT * FROM products where "
End If
For x = 1 To (formcount - 1)
If Request.Form.item(x) <> "" Then
sql = sql & Request.Form.Key(x) &"="& Request.Form.Item(x) &""
sql = sql & " And "
End If
Next
In article <e9**************@tk2msftngp13.phx.gbl>, Ray Costanzo [MVP]" <my
first name at lane 34 dot commercial> says...
I don't believe that you'll find a replacement for this, as the Request.Form
collection is read-only. Try something like:
For each thing in Request.Form
If thing <> "categoryid" And thing <> "shopinspection" Then
'''your code
Next
Ray at work
<fa*****@yahoo.com> wrote in message news:cl*********@drn.newsguy.com... Hi everybody I have got the following PHP code which I am trying to
convert to
ASP any help will be appreciated...I have done most of it but I cant find
a
replace function for Unset in asp which will discard the variable
alltogether...
if ($categoryid == "all")
{
$sql = "SELECT * FROM products where shopinspection=$shopinspection";
unset($HTTP_POST_VARS['categoryid']);
unset($HTTP_POST_VARS['shopinspection']);
}
else
{
$sql = "SELECT * FROM products where categoryid = $categoryid";
unset($HTTP_POST_VARS['categoryid']);
}
unset($HTTP_POST_VARS['Submit']);
while (list($key, $value) = each($HTTP_POST_VARS))
{
if ($value != "" )
{
$sql = $sql .=" AND $key=$value";
//$sql = $sql .=" AND solesource = $solesource";
//echo "<strong>$value</strong>";
}
}