Reply LinkBack Thread Tools Search this Thread
Old 31-03-2008, 06:46   #1 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 4,739
Concatenating field values before form submit

I am doing a payment gateway and I need to concatenate the month and year from two seperate dropdowns to one variable before submit.

$EXPDATE = $MONTH.$YEAR;

I guess is javascripty but I don't know any?

Or whether a javascript variable if constructed is recognised and passed by the form.

Thanks if you can help.
__________________
  Reply With Quote
Old 31-03-2008, 06:48   #2 (permalink)
d*d
Senior Member
 
d*d's Avatar
 
Join Date: Oct 2004
Location: Bristol
Posts: 3,158
Can't it be done server side?
  Reply With Quote
Old 31-03-2008, 06:51   #3 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,365
Aye, that sounds like it should be done server-side.
__________________
Random goodness at The Blog

  Reply With Quote
Old 31-03-2008, 07:00   #4 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 4,739
I don't know how I would do that without a second page where the concatention is done but requires to submit again.

I can work around this I have worked out by taking card details on page one, submit goes to page two to collect the address details and I can concatenate there before final submit to gateway.

Or I can simply do 'View And Confirm Details Are Correct' page. Yes that works.

But if you can briefly explain the method you both mean perhaps you can fill a hole in my knowledge if not too much typing involved?
__________________
  Reply With Quote
Old 31-03-2008, 07:09   #5 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 4,739
Durrrr! I have to do that anyway to validate the input for req'd fields.
__________________
  Reply With Quote
Old 31-03-2008, 07:14   #6 (permalink)
.sleep
Senior Member
 
.sleep's Avatar
 
Join Date: Mar 2007
Location: california
Posts: 276
Send a message via AIM to .sleep
Assuming you are writing this stuff to a database, are you writing it after each page or just one final one at the end?

edit: I think you figured it out. My question was leading there anyway.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8