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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:16:05+00:00 2026-05-27T15:16:05+00:00

I want to make a call to some php file before that I’m trying

  • 0

I want to make a call to some php file before that I’m trying to use forms to store user data into database through a php file, but the problem is form can’t call two actions in a single form.

My submit should be redirecting me to do storing database and display those contents with php file?

Can any one having idea what i’m doing mistake or alternative task to do for it ?

  • 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-05-27T15:16:05+00:00Added an answer on May 27, 2026 at 3:16 pm

    If you really want to separate the pages for form, database_actions and display:

    In your php file containing the form:

    <form action="database_actions.php"><!-- means form posts to action.php //-->
    

    In database_actions.php :

    # Place code to insert into database and make sure 
    # no echo or print_f/r commands are issued
    # and no spaces or line breaks at the top before `<?php`
    # Then place this at the end of
    header("Location: http://host/display.php");
    

    In display.php, you can show whatever output. If you have values to pass, then you may force the movement through sessions.

    This kind of approach used to be fine in the old days, MAYBE, but now there are many ways to properly perform the actions you have in mind.. One of them is the Model-View-Controller design pattern.

    Of course, you’d be better off using an MVC design pattern.. Here’s a sample link:

    http://www.tonymarston.net/php-mysql/model-view-controller.html

    You can perform a search in google too.. Surely you’ll find loads more on MVC patterns..

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

Sidebar

Related Questions

I want to be able to make an HTTP call updating some select boxes
I want to make a automated call application, which will dial some mobile numbers,
I am trying to create a little php script that can make my life
I want to make a link call a Javascript function through the onclick event
I want to make an ajax call, but I want to make sure it
I often want to make a multiline function call and reduce it down to
Let's say I want make some of my sources publicly available via my blog
I want to make an etag that matches what Apache produces. How does apache
I want to make a table in SqlServer that will add, on insert, a
I have an Android application from which I want to upload some data to

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.