Creating a feedback form using switch statement!

Discussion in 'PHP' started by scutari, Jun 7, 2008.

  1. #1
    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?
     
    scutari, Jun 7, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    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
     
    Danltn, Jun 7, 2008 IP
  3. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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:

     
    scutari, Jun 7, 2008 IP
  4. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #4
    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 :p

    Dan
     
    Danltn, Jun 7, 2008 IP