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 7940947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:31:07+00:00 2026-06-03T23:31:07+00:00

I have an application where I’m using a URL parameter to trigger a results

  • 0

I have an application where I’m using a URL parameter to trigger a results message after a certain action and a redirect. Example flow is like this:

1. User fills out form and clicks "Update"
2. [PHP code to update DB]
3. header('Location: [next-page.php]?message=1')
4. [PHP code on checks DB for the text of message id #1 and echo the message, (e.g. "Update successful!")]

This works well initially, but with a couple of problems. The URL parameter remains after the message is displayed, so if the page is refreshed, or if the user clicks back to that page later, the message displays again. I am looking for a way to do what I described above, but only show the message the first time. I would like to avoid creating a database entity for each result message with an attribute for whether it’s been viewed already or not as that seems like overkill. How would you handle this?

  • 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-03T23:31:10+00:00Added an answer on June 3, 2026 at 11:31 pm

    One method would be to POST the form to next-page.php, then execute this code on the page:

    if (isset($_POST['form_element']))
        include("form-process.php"); //Or whatever page the DB update goes in
    

    Edit: You can also do it with Javascript. Put this on the page where your form is:

    $("#ajax_submit").click(function(){
        $("#ajax_form").submit();
        window.location=location.protocol+'//'+location.host+location.pathname+"nextpage.php";
    });
    

    On a page where the form is like:

    <form action="process_form.php" method="POST" id="ajax_form">
        Name: <input name="username"><br>
        Password: <input name="password" type="password"><br>
        <input type="submit" value="Login" id="ajax_submit">
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have application that makes different queries with different results so the caching in
I have application where i can change XAML file. For example: Move and resize
I have application with in app billing. I'm using the AndroidBillingLibrary to manage the
I have application written in Java that is using EJB3 + Toplink. I'm using
I have application building using third party apis, j2me apis,application code distributed in various
I have application launched using maven cargo plugin with jetty6x. I get HTTP/1.1 413
We have application have been written in Silverlight using MVVM pattern. We need to
I have application which can export slides to PowerPoint. I'm using Microsoft.Office.Interop.PowerPoint.dll . This
I have application A defined as below: <application android:icon=@drawable/icon android:label=@string/app_name> <activity android:name=com.example.MyExampleActivity android:label=@string/app_name> <intent-filter>
I have application using Android 2.1 which utilize LocationManager to get the altitude. But

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.