I have read this book which tells about creating a feedback form using the switch statement and a function called step... What do you think..Is this the right way to do that?
Very poor... there is no function called step. And why would you need switch to write a feedback form? All you use is switch is checking the value of a variable against a list/array/function return of values. Nothing else. Dan
Oh are you saying that i invented this...I read from a book called php_by_example... I am sorry I wrote bad, I meant a variable called step. check the source:
Switch is an acceptable way of providing a multi-page form. Although if possible hold data in sessions or similar rather than requiring hidden forms each time. On the surface though there's nothing particularly wrong with this, and I have employed it myself (albeit slightly differently) in a few circumstances. An example is www.bloggermap.com/submit - Ironically this does use hidden forms, but hey. I wasn't so great back then Dan