Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9158165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:11:08+00:00 2026-06-17T13:11:08+00:00

I have a POST form where of course there is things in it that

  • 0

I have a POST form where of course there is things in it that you need to submit. when I submit it I usually submit them to another file for example action.php. Now here is my question: after submitting the file and after all the operations that user wanted are done how do you usually deal with the situation? do you redirect back to the previous page? if so, how can you show that the operation the user wanted are executed and there is no error?
to be more specific look at the following code:

if ($_POST['something']) {
$doeverything
if $doeverything 
{
what do you usually put here? how can I show a message here, in the same time, I am back to the previous page where I submitted my information in.
}

how can I assign an error after redirecting back?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:11:09+00:00Added an answer on June 17, 2026 at 1:11 pm

    You can do this using the PHP sessions. When you finish your work in action.php, you store the message in session like $_SESSION['message'] = 'Completed' and you can redirect to previous page. In the page where you have submitted your form, you can show the message using the session like echo $_SESSION['message']

    Another way may be using $_GET super global variable. You can redirect to previous page using redirect_to('previous_page.php?success=yes'). In previous page you can check the value of $_GET['success'] and if it is yes you can echo ‘Your form is successfully submitted’

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this HTML: <form action='uploadhandle.php' method='POST' enctype=multipart/form-data> <input type='file' class='fileinput' id='photo1' name='photo1'> <input
For example, I have a HTML form with several input buttons, <form action=/index.php method=post>
I have a post html form, and the action is index.php, which is the
I have a simple form that looks like so <% remote_form_for post, :url =>
I have a basic POST form being submitted. Every time a form is submitted,
I have button which post values of form to url but during post i
i have the following javascript to post a form through ajax without refreshing the
I have a html form with the data by this post method 'form id='form1'
i have a code to send a Form Post with login credentials to a
I have a form which POST's its data via AJAX: $.ajax({ type: POST, url:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.