Thread: Curly brackets!
View Single Post
Old 05-06-2009, 04:36 PM   #15 (permalink)
Guezala
The Contributor
 
Guezala's Avatar
 
Join Date: May 2009
Location: West Midlands
Posts: 26
Thanks: 2
Guezala is on a distinguished road
Default

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 :(
Send a message via MSN to Guezala Send a message via Skype™ to Guezala
Guezala is offline  
Reply With Quote