Link to home
Start Free TrialLog in
Avatar of rivkamak
rivkamakFlag for United States of America

asked on

asp request.form

I have a form that posts and shows results from a database.
when the page asks for another 5 more, the url adds the url and the query parameters to the list.
By the time I click next 2 times, it adds the full url again and I end up with the form variable twice.
For example. I get id=618408&id=618408.
Then my script doesn't work anymore because request.form("id") comes in as 618408,618408.
is there a way i can set up that no matter how many times it's listed,  i should only get the first one?
Avatar of Gary
Gary
Flag of Ireland image

Some code would be helpful
You should have a link something like below.  Just know the code I have is for testing.  In real world, you would want to scrub your request("something") instead of sending right to the db.


< a href="page.asp?id=<%=request("id")%>&page=<%=cdb(request("page"))+5%>"> Next</a>
Avatar of rivkamak

ASKER

right now it's set up with tons of extra code that dreamweaver put in automatically.
it looks like dreamweaver says , 'whatever was there before and then new fields again'.
Do you have a link to the page. Without this or some code it's just a guessing game
I suspect you may be missing a slash from the beginning of the href tag.
Which version of dreamweaver do you have?  mx/cs3 or cs4,5,6?  The 2 groups handle the automated stuff differently.  I would also suggest a little handcoding to create a faster db loading and paging.  That can come later.
Let me rephrase the question.
If my url says index.asp?id=618&id=618.
is there a way to request.querystring("id") should only return the first id and not both?
Why hack a problem instead of fixing it? This will only likely lead to further problems down the line.
What is wrong with posting some of your code or a link?
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial