<% 'register2.asp 'take info from registration form and submit it to the db 'then go to a confirm page with cc info on it. 'request all forms from referring page: fname = request.form("fname") lname = request.form("lname") address = request.form("address") address2 = request.form("address2") city = request.form("city") state = request.form("state") Zip = request.form("Zip") phone = request.form("phone") email = request.form("email") password = request.form("password") password2 = request.form("password2") newcust = request.form("newcust") howhear = request.form("howhear") 'submit info to the DB... call openConn 'user may not have entered info into Address 2 field... If address2 = "" then SQL = "INSERT INTO customer_tbl (customer_fname, customer_lname, customer_address," SQL = SQL & "customer_city, customer_state, " SQL = SQL & "customer_zip, customer_phone, customer_email, customer_newcust, customer_howhear) " SQL = SQL & "" SQL = SQL & "VALUES ('"&fname&"', '"&lname&"', '"&address&"', '"&city&"', " SQL = SQL & "'"&state&"', '"&zip&"', '"&phone&"', '"&email&"');" else SQL = "INSERT INTO customer_tbl (customer_fname, customer_lname, customer_address," SQL = SQL & "customer_address2, customer_city, customer_state, " SQL = SQL & "customer_zip, customer_phone, customer_email, customer_newcust, customer_howhear) " SQL = SQL & "" SQL = SQL & "VALUES ('"&fname&"', '"&lname&"', '"&address&"', '"&address2&"', '"&city&"', " SQL = SQL & "'"&state&"', '"&zip&"', '"&phone&"', '"&email&"','"&newcust&"', '"&howhear&"');" end if 'response.write SQL Call openCMD(SQL) 'now present a new form for the user to see what theyve ordered and to add their pmt info... %>

Online Registration Checkout: Step 2 of 2

<% '******************************************************* 'Background to this script '******************************************************* ' ' '************************************************************** 'This function generates a random code based on the code length 'specified when calling the function. The random code is 'returned under the variable "randomcode". '************************************************************** FUNCTION GetRandomCode(randomcode,codelength,numberofcombinations) 'Number of characters in the array below codecharacters = 35 'Array of characters being used for the random code codearray = Array("a","b","c","d","e","f","g","h","i","j","k","l", _ "m","n","o","p","q","r","s","t","u","v","w","x", _ "y","z","1","2","3","4","5","6","7","8","9") 'Generates one random character until it reaches code length FOR x = 1 TO codelength RANDOMIZE 'Gets a random number based on the value in the codecharacters variable thiscode = (Int(((codecharacters - 1) * Rnd) + 1)) 'builds the code on top of itself until complete by selecting the 'character from the array based on the random number generated above totalcode = totalcode & codearray(thiscode) 'This is only an extra thing to tell you how many combinations 'there are for the code length specified. You may get scientific 'notation to describe the length so, just take it that is damn near 'impossible to guess the code. IF numberofcombinations = "" THEN numberofcombinations = 1 numberofcombinations = numberofcombinations * codecharacters NEXT 'Random code that is returned after codelength has been fulfilled randomcode = totalcode END FUNCTION 'The following line calls (runs) the above script. First variable can be left 'as is but you can change the value below to any number to generate a code of 'that length. 3 returns a three character random code, 9 returns a nine 'character random code... and so on! CALL GetRandomCode(randomcode,9,numberofcombinations) 'You can now use the code for whatever purpose e.g. order number, random password, 'unique id, etc, etc. purchase_id = randomcode 'This is only an extra thing to tell you how many combinations there are to the code length. 'Response.Write("

Total combinations for this code length: " & FormatNumber(numberofcombinations,0)) '************************************* 'display the cart for confirmation... 'SQL = "SELECT * FROM class_tbl WHERE class_id = 0" SQL = "SELECT [class_datetime_tbl].[class_datetime_id], [class_datetime_tbl].[class_datetime], " SQL = SQL & "[class_tbl].[class_price], [class_tbl].[class_name]" SQL = SQL & "FROM class_tbl INNER JOIN class_datetime_tbl ON " SQL = SQL & "[class_tbl].[class_id] =[class_datetime_tbl].[class_id] " SQL = SQL & "WHERE [class_datetime_tbl].[class_datetime_id]=0" 'Iterate thourhg the whole session collection and display the results. for each sessprop in session.contents if session.contents(sessprop) <> "" then SQL = SQL & " or [class_datetime_tbl].[class_datetime_id] = " & sessprop 'response.write ("Item # "& sessprop &"Product Item Number " & Session.Contents(SessProp) & " -
") end if next 'response.write SQL 'for testing only response.write "" response.write "" Call openRS(SQL) totalprice=0 While NOT RS.EOF price = rs("class_price") totalprice = totalprice + price Response.write "" rs.movenext WEND call cleanup %>
"&RS("class_name") & ""&trimseconds(RS("class_datetime")) & "" & formatcurrency(price) & "
TOTAL: <%=formatCurrency (totalprice)%>

Name as it appears on card*
Card Number*
Expiration Month*
Expiration Year*
Card Type*

* Required fields

CLASS CANCELLATION/NO SHOW POLICY: At Nothing To It!, we know that life happens. That is why we are proud to offer you the most accommodating cancellation policy of any cooking school in the country. If you cannot attend class, call us at (775) 826-2628 48 HOURS BEFORE the class and we will give you credit towards a future class TO USE WITHIN 60 days. If you cancel after this time or miss a class, no refunds or credit will be given but you can have the class handout which includes the recipes. If there is a waiting list for the class you cancel and we can fill your space, we will give you credit towards a future class. If you are unable to attend class, you may send someone in your place. Refunds will only be given if NTI cancels the class. We truly appreciate your patronage and look forward to serving you for years to come.
*I accept the class cancellation policy

Have a question?, contact us by email