<% 'on error resume next RecipeID=request.form("RecipeID") RecipeName=request.form("RecipeName") CurryID=request.form("CurryID") StrengthID=request.form("StrengthID") RecipeDescription=request.form("RecipeDescription") RatingNo=request.form("RatingNo") Source=request.form("Source") Vegetarian=request.form("Vegetarian") Vegan=request.form("Vegan") TimeToPrepare=request.form("TimeToPrepare") TimeToCook=request.form("TimeToCook") NumberofServings=request.form("NumberofServings") Ingredients=request.form("Ingredients") Instructions=request.form("Instructions") Notes=request.form("Notes") Sender=request.form("Sender") dim conn dim strSQL strQuote = Chr(34) counter = 1 While counter < 7 if StrengthID=strengths(counter) then intStrengthID=counter end if counter = counter + 1 wend counter = 1 While counter < 8 if RatingNo=difficulty(counter) then intRatingNo=counter counter = counter + 1 wend counter = 1 While counter < 22 if CurryID=currytype(counter) then intCurryID=counter counter = counter + 1 wend strSQL = "" strSQL = "INSERT INTO RECIPES(RecipeID, RecipeName, CurryID, StrengthID, RecipeDescription, RatingNo ,Source, Vegetarian, Vegan, TimeToPrepare, TimeToCook, NumberofServings, Ingredients, Instructions, Notes, Comments, Approved, Sender,Icon1,Icon2,Icon3,Icon4,Icon5)" strSQL = strSQL & " VALUES (" strSQL = strSQL & RecipeID & "," strSQL = strSQL & "'" & RecipeName & "'," strSQL = strSQL & intCurryID & "," strSQL = strSQL & intStrengthID & "," strSQL = strSQL & "'" & RecipeDescription & "'," strSQL = strSQL & intRatingNo & "," strSQL = strSQL & "'" & Source & "'," strSQL = strSQL & "'" & Vegetarian & "'," strSQL = strSQL & "'" & Vegan & "'," strSQL = strSQL & "'" & TimeToPrepare & "'," strSQL = strSQL & "'" & TimeToCook & "'," strSQL = strSQL & "'" & NumberofServings & "'," strSQL = strSQL & "'" & Ingredients & "'," strSQL = strSQL & "'" & Instructions & "'," strSQL = strSQL & "'" & Notes & "'," strSQL = strSQL & "' '," strSQL = strSQL & "'No'," strSQL = strSQL & "'" & Sender & "'," strSQL = strSQL & "' '," strSQL = strSQL & "' '," strSQL = strSQL & "' '," strSQL = strSQL & "' '," strSQL = strSQL & "' ')" 'Set connection object set conn = server.createobject("adodb.connection") conn.open strConn 'Use the execute method of the connection object the insert the record conn.execute(strSQL) conn.close set conn = nothing %> Many thanks for you recipe submission.

Your recipe can be viewed here <% response.write "" & RecipeName & "


"%> <% response.write strSQL %>


[ Home | Search | Add | Indexes | News | Links | Guestbook | Poll | T-shirt | About ]