Script Library: 1213 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Discussion posts for script cgiformobj.r

1
marsds
21-Apr-2005 17:10
Hi, 


I am not a programmer. I'm just a beginner web designer & I saw 
your scripts. I don't konw how to use any of them? What should I 
do?


The way I have my form now is thru cgimail using a text file that 
sends an email out to the applicant & to bcc to me. 


I need to add an ID number that should be generated automatically. 
So I thought of using date&time combined to do so. But I don't 
know how to add the date to my cgi text file?

The form I have is on: www.mwa.marsds.com 

here is a copy of the text file I use:

From: app@marsds.com
To: [Email]
BCC: app@marsds.com
Subject: MWA Application from [Name]

Hi [Name],


Thank you for your submission! Mars Web Award team will verify the 
information of the submitted site. You will be notified as to your 
results once the judges undertake their evaluation. We estimate the 
notification process to take 7-14 days at this time.
	
Please verify that the following information is correct:
Name:		[Name]
Email:		[Email]
URL:		[URL]
Site Name:	[SiteName]
Special Quote: [Quote]
Your ID: ???????????? that's the part i need help with??????????


If you need to revise any of the previous information please email 
us at: app@marsds.com



Good Luck.

mars design studio
www.marsds.com 
2
sunanda
21-Apr-2005 17:51

Here's a version of the function we use to assign a unique ID to Feedback messages

 unique-code: func [date /local to-2dig base s1 s2] [
 	to-2-dig: func [val] [either val < 10 [rejoin ["0" val][form val]
 	base: "abcdefghijklmnopqrstuvwxyz0123456789"
 	rejoin [
 		pick base date/year - 1999
 		pick base date/month + 1
 		pick base date/day + 1

 		pick base date/time/hour + 1
 		to-2-dig date/time/minute
 		to-2-dig s1: to-integer s2: date/time/second
 		pick base to-integer s2 - s1 * 36 + 1
 		random/secure/only base       ;; in case 2 in same second
 		random/secure/only base       ;; in case 2 in same second
 	]
 ]

 

For a discussion about general programming techniques, I recommend you join the Mailing List  and ask there.

Notes