Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Spyware and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Important Announcement: We have a terrific contest still running on the site that I wanted all our members and guests to know about.

The chance to win two Seagate FreeAgent external hard drives. More information about this contest can be found here.

I suggest everyone submit an entry for them.

- BleepingComputer Management
 
Reply to this topicStart new topic
> Combining 2 variables in a ASP Form, Credit Card expdate
deloa2
post Aug 6 2004, 02:02 AM
Post #1


New Member
*

Group: Members
Posts: 8
Joined: 12-July 04
Member No.: 1,379



I need in to post a variable EXPDATE (in the format "mmyyyy") that is composed out of two variables captured through a SELECT/OPTION tags. One is for the month and the other one for the year.

Your help wil be appreciated!

This is my code that goes inside my Form:

<select name="Month">
<OPTION value="" selected>Month</OPTION>
<OPTION value="1">Jan</OPTION>
<OPTION value="2">Feb</OPTION>
...
<OPTION value="11">Nov</OPTION>
<OPTION value="12">Dec</OPTION>
</SELECT>
&nbsp;/&nbsp;
<select name="Year">
<OPTION value="" selected>Year</OPTION>
<OPTION value="<%response.write(Year(date()))%>">="<%response.write(Year(date()))%></OPTION>
<OPTION value="<%response.write(Year(date())+1)%>"><%response.write(Year(date())+1)%></OPTION>
<OPTION value="<%response.write(Year(date())+2)%>"><%response.write(Year(date())+2)%></OPTION>
<OPTION value="<%response.write(Year(date())+3)%>"><%response.write(Year(date())+3)%></OPTION>
</SELECT>
<%
xExpdate = MonthYear '----This doesn't sound right(?)
%>
<input type="hidden" name="EXPDATE" value="<%response.write(xExpdate)%>">
Go to the top of the page
 
+Quote Post
HuckerJ
post Aug 6 2004, 05:50 AM
Post #2


Forum Regular
***

Group: Members
Posts: 189
Joined: 11-April 04
From: East Tennessee
Member No.: 122



Doesn't ASP use ampersands to concatenate?
CODE
<%
xExpdate = Month & Year
%>


This post has been edited by HuckerJ: Aug 6 2004, 05:52 AM


--------------------
There are 10 kinds of people. Those who understand binary notation, and those who do not.
user posted image - It plays, it streams, it kills WiMPs!!
Go to the top of the page
 
+Quote Post
deloa2
post Aug 6 2004, 01:03 PM
Post #3


New Member
*

Group: Members
Posts: 8
Joined: 12-July 04
Member No.: 1,379



Unfortunatelly your option didn't work.

When you submit the form, the values for month and year are submitted directly without asigning the value for EXPDATE. Therefore EXPDATE goes null

Please any other options?

Thx!
Go to the top of the page
 
+Quote Post
HuckerJ
post Aug 7 2004, 08:53 AM
Post #4


Forum Regular
***

Group: Members
Posts: 189
Joined: 11-April 04
From: East Tennessee
Member No.: 122



I see.... huh.gif
Try this:
CODE
dim 1, 2, xExpdate : 1 = request("month") : 2 = request("year") : xExpdate = 1 & 2


This post has been edited by HuckerJ: Aug 7 2004, 08:56 AM


--------------------
There are 10 kinds of people. Those who understand binary notation, and those who do not.
user posted image - It plays, it streams, it kills WiMPs!!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 5th December 2008 - 12:35 PM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.