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

  • SEARCH
  • Home
  • 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 8605397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:49:13+00:00 2026-06-12T02:49:13+00:00

I am making a page that has a bunch of fields that allows the

  • 0

I am making a page that has a bunch of fields that allows the user to enter in information and submit it to a database. This page is called ‘add.php’ I created a ‘form’ tag and had the information posted to another page called ‘process.php’ where the information is collected, then inserted into the database. I want the user to know whether it was successful or not, so I was wondering how to tell the user something specific on the ‘add.php’ page. like “insertion successful!” at the top of the page.

I thought of including the ‘process.php’ code in ‘add.php’, then calling the ‘add.php’ in the action of the form, but the code gets called the first time the page is loaded, which inserts a completely blank entry into the database.

Should I implement some sort of flag that is only set to true after the ‘submit’ button is clicked? Or is there another way to update the page and tell the user the status of the insertion?

I can paste the relevant code as needed. 🙂

Thanks!

  • 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-12T02:49:14+00:00Added an answer on June 12, 2026 at 2:49 am

    Assuming that you are using the post method in your form and php, you can simply check if a post was made:

    if ($_SERVER['REQUEST_METHOD'] === 'POST')
    {
      // form was posted, process and display output
    }
    else
    {
      // nothing was posted, normal get request, show form
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a site that has a bunch of photos and under each
I am making an app that the user could add many accounts and view
I am making a non-secure page that has an iframe for a secure form.
Im making a web page that has a 'fullscreen mode'. Its a normal web
I am making a one page site that has a classic navigation at the
What I am making is basically is a user profile that has a text
I'm making an aspx page that can edit books. A book is an complex
I am making a web page in that I have used Ajax calendar to
I am interested in making some sort of HTML page that displays the name
i'm making app that the main page include TableView but i want when i

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.