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 ?
If you really want to separate the pages for
form,database_actionsanddisplay:In your php file containing the form:
In
database_actions.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..