OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Update two fields with one dropdown box?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Update two fields with one dropdown box?
Page: [1]
 
mjmtravel

 

Posts: 327
Joined: 7/30/2006
Status: offline

 
Update two fields with one dropdown box? - 5/22/2009 9:55:33   
I know I have been asking a lot from the forum here lately but I'm trying to do some different stuff in unfamilier territory.

IF I'm using a front page created form updating a database, is it possible to update two fields in the table with one dropdown box.

Example: I have a dropdown box with island names and I would like to add the island ID to the table also. The reason is if I don't have the ID in the table the results will show everything with no ID to the island.

Hope that makes sense.
Thanks.
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Update two fields with one dropdown box? - 5/22/2009 13:44:19   
Depends on how you are shoving the data into the db.
If you are using a processing page--where you post the form to a second page to let the user view their input before a final submit, or just to allow some form processing (we usually do it with "case selects" on a single page) prior to shoving the data into a db and sending out emails--then grab the value of the island field from the dd box and use that variable to create your id.

Example:

<%
DIM island_field, island_ID
island_field=request.form("island_field")
IF island_field="" then
response.write("You didn't fill in the Island Field, go back and try again!")
end if
IF island_field="hawaii" then
island_id="1"
end if
%>

and so on....

Now you have an island_id variable to shove into the db.



_____________________________

:)

Follow us on TWITTER

(in reply to mjmtravel)
mjmtravel

 

Posts: 327
Joined: 7/30/2006
Status: offline

 
RE: Update two fields with one dropdown box? - 5/22/2009 14:25:45   
I'm using a straight form not on a diet or using a second page. It goes directly to the database.

(in reply to TexasWebDevelopers)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Update two fields with one dropdown box?
Page: [1]
Jump to: 1





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