Home > database >  Wants to display form once
Wants to display form once

Time:09-06

I have a form for user profile & I wants to display the form only once means after the form submitted by the user that won't come again, can anyone help me to do this, thank you

CodePudding user response:

You can try to hide the form after the user submitted, You can use Ajax to make a post data and after getting response successfully hides the form.

CodePudding user response:

If you submit the form to the same page or to a different page, you will probably work with your post variables.

IF(isset($_POST)

...
...
Header ('location:your-return-page.php?result=success');

Since you will return to the same form page with a get result of result = success, you can wrap your form with

<?php if (!isset($_GET['success']) { ?>
<Form>
<Form/>
<?php } ?>

You will not see that form after form submitted

  •  Tags:  
  • php
  • Related