Writing a $.cookie to show a form upon submit in a multi form page

前端 未结 1 1532
清酒与你
清酒与你 2021-01-27 17:48

Writing a page with use of $.cookie to show a form upon submit in a multi form page. I have seen similar questions go unanswered when it got to this specific code. I have read

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-27 18:19

    Ok so overall we will have a page with the forms, and a php processing page. I explained most of it in the comments. Let me know if you have any questions!

    Here is a demonstration page

    This is a quick validation to see if the value is empty or not, you can do whatever validating you need to

    Page 1 - send-ajax-form.php - CSS

     
    

    Page 1 - send-ajax-form.php - HTML

    Form One
    Form Two
    Form Three

    Page 1 - send-ajax-form.php - Script (Buttons)

     
    

    Page 1 - send-ajax-form.php - Script (Ajax Calls)

    
    

    Page 2 - process-ajax-form.php - PHP

    
    
    
    Uh oh, something went wrong with form 1!";
            }else{
                echo "Great, everything is all good with form 1!";
            }
    }
    
    ?>
    
     Uh oh, something went wrong with form 2!";
            }else{
                echo "Great, everything is all good with form 2!";
            }
    }
    
    ?>
    
        Uh oh, something went wrong with form 3!";
            }else{
                echo "Great, everything is all good with form 3!";
            }
    }
    
    ?>
    

    0 讨论(0)
提交回复
热议问题