|
| |
|
|
dido_11
Posts: 14 From: None Status: offline
|
form post - 3/3/2001 20:18:00
I have an access database like this:code description CustId 001 Aquarium 123 002 Fishfeeds 345 003 Fertilizer 567 i make use of the following asp code
<form method="POST" action="viewcode.asp"> <select size="1" name="code"> <option value="<%=rs("description")%>"><%=rs("code")%></option> </select> <input type="submit" value="Submit" name="B1"></p> </form> as i understand, this code when run will show the user the description and the post information will contain the codes. How can i submit together with the code the CustId? Thanks in advance.
|
|
|
|
Spooky
Posts: 26597 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: form post - 3/4/2001 20:00:00
Ideally you shouldnt, as the 'code' already contains reference to a foreign key. Any queries that look up '002' for example, will always still relate to '345'.The code would form the ID : <option value="<%=rs("Code")%>"><%=rs("description")%></option> An option would be to concatenate the code field and the ID field: <%=rs("Code")& rs("CustId")%> Thus giving 002345 But it would depend on the end use you require
------------------ Spooky "I am Spooky of Borg. Prepare to be assimilated, babycakes!" Subscribe to OutFront News Database / DRW Q & A The Spooky Login!
|
|
|
|
dido_11
Posts: 14 From: None Status: offline
|
RE: form post - 3/4/2001 20:41:00
Thanks Spooky,in your code: <%=rs("Code")& rs("CustId")%> both the Code and the CustId will be seen by the user. What if we dont want the user to see the CustId and still the CustId will be carried over to another asp page? Dido
|
|
|
|
Spooky
Posts: 26597 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: form post - 3/4/2001 14:45:00
Ultimately, to pass both from the same page, they would be visible in html code.If only 'code' was used, on the next asp page, that I assume does some processing, you could then find the related custID based on 'code' That way, it wouldnt be visible at all. ------------------ Spooky "I am Spooky of Borg. Prepare to be assimilated, babycakes!" Subscribe to OutFront News Database / DRW Q & A The Spooky Login!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|