. I have a table named users. I want to set the first one as a menu list
page, once someone select a username from the drop down list, the second asp
page will retrieve information about the user from the users table, but my asp
page does not show anything. need help.
// the first html page//
h****e 发帖数: 204
2
ft, u didn't set anything for the QueryString, how can u use it?
asp
【在 h****r 的大作中提到】 : . I have a table named users. I want to set the first one as a menu list : page, once someone select a username from the drop down list, the second asp : page will retrieve information about the user from the users table, but my asp : page does not show anything. need help. : // the first html page// : : :
h****r 发帖数: 2056
3
But how to set it? pls.thanks
asp
【在 h****r 的大作中提到】 : . I have a table named users. I want to set the first one as a menu list : page, once someone select a username from the drop down list, the second asp : page will retrieve information about the user from the users table, but my asp : page does not show anything. need help. : // the first html page// : : :
o***z 发帖数: 133
4
'try add this:
username=Request("username")
if (username <> "") then response.write username
'see what you get
'were you using 1,2... as the usernames?
【在 h****r 的大作中提到】 : But how to set it? pls.thanks : : asp
h****r 发帖数: 2056
5
it still does not work. No, I set the username as the real name, not number.
wuwu
【在 o***z 的大作中提到】 : : 'try add this: : username=Request("username") : if (username <> "") then response.write username : 'see what you get : 'were you using 1,2... as the usernames?
o***z 发帖数: 133
6
really? the output should be numbers
have you tried something like
test.asp?username=Lindsey
【在 h****r 的大作中提到】 : it still does not work. No, I set the username as the real name, not number. : wuwu
k*******d 发帖数: 237
7
Try this in the first page:
Should work. Good luck
h****r 发帖数: 2056
8
none of them works.
number.
【在 o***z 的大作中提到】 : really? the output should be numbers : have you tried something like : test.asp?username=Lindsey
k*******d 发帖数: 237
9
???!!!
Did you try to make some changes in the first page?
Change the values of the options to the usernames instead of numbers
Also see my TZ above
【在 h****r 的大作中提到】 : none of them works. : : number.
h****r 发帖数: 2056
10
ya, i tried all suggestions, but none of works. that is ok. i have sent my
code to an expert of ASP. hope can solve this problem finally
thanks
【在 k*******d 的大作中提到】 : ???!!! : Did you try to make some changes in the first page? : Change the values of the options to the usernames instead of numbers : Also see my TZ above
then i think the problem lies in your asp page
how about this?
<%
Set objDC = Server.CreateObject("ADODB.Connection")
objdc.open "dsn=users;pwd=letmein"
sqltext="SELECT * FROM users WHERE (username = '" & request("username") &"')"
Response.Write "
"&sqltext&" "
Set objRS=objdc.Execute(sqltext)
if NOT ...
......
【在 h****r 的大作中提到】 : none of them works. : : number.
h****e 发帖数: 204
12
HTML 4.0 好象不再支持这种 selected value
所以你想显示这个东西是显示不出来的
可以用onchange event来active 个javascript记录
k*******d 发帖数: 237
13
Not really. Drop down box is implemented by syntax of
【在 h****e 的大作中提到】 : HTML 4.0 好象不再支持这种 selected value : 所以你想显示这个东西是显示不出来的 : 可以用onchange event来active 个javascript记录
h****r 发帖数: 2056
14
It works. hahha
the problem is very funny.
cause I set autonumber for my table records, and later i deleted the first
five records, so the autonumbre begins from 6, that is why i cannot get the
value shown up. because my option value passed to asp begins from 1 to 3.
whatever. thanks all.
btw, why do I always make this kind of stupic mistake. too careless.
在 huster (huster) 的大作中提到: 】
k*******d 发帖数: 237
15
Usually, it will take 3 times longer time for debugging and maintaining the
code than writting the code. Which will let programmers always have work to do
number.