WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Form retaining session variables. (3 posts)

  1. Gaurav Ganeriwala
    Member
    Posted 1 year ago #

    So I made a custom form with functions to show an error message
    if the mandatory input areas were left empty. But after the form is submitted once, it apparently retains the values in $_POST['name_of_element'] rendering the whole checking process useless.

    I tried adding a session_destroy(); at submission but that leads to a php error claiming that no session was initiated.

    Any help with this would be much appreciated. I just need the $_POST variables to be cleared when the functions have completed.

  2. Gaurav Ganeriwala
    Member
    Posted 1 year ago #

    Nevermind. Found a resolution.

  3. Gaurav Ganeriwala
    Member
    Posted 1 year ago #

    Nevermind. Found a resolution.

Topic Closed

This topic has been closed to new replies.

About this Topic