05-06-2009, 03:57 PM
|
#16 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by Guezala
Blimey!
Well I need some chocolate now and a brain transplant. I'd hate to see your advanced section!
Since we have veered a bit i will take this opportunity to ask a more specific question.
Basically the if elses i was talking about would do this:
Firstly check if all my variables (answers to questionnaire) were not set. If not set, prompt to fill in.
Then progressing to validating some user info using some simple regexes (5 variables in total), then to print out a thankyou message and format an email to myself with all the inputed info.
I have all the code.... just not sure how I am going to join it.
If I use switch then can i ask first if the variables are set, then that each of the user info variables are valid then print thankyou and send mail? I don't think I can use foreach because they are diff regexes for each input.
I really thought I had this but brain is mush now :(
|
Can't you do a loop for the majority of the inputs and then for the 5 variables do those using regex?
I'll try to come up with a quick example unless someone comes up with one before I do....
|
|
|
|