954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Post Method Page to Page

Here is the scenario...

I submitted a form using post method.
It will not yet save the data to the database.
Instead, the post data will be redirected first to a page to view input results.
Then if the user is satisfied, then thats the time to save the data to the database.

How can i do that? can I put it in session? how?
Pls guide me.. Im a newbie.

thanks!

rakwel10
Junior Poster in Training
68 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

To use session you must do like this...
First of all your first line must be the starting of session and then declaring a variable and storing value in that session variable....
For eg:-

<?php
session_start();
?>
<html>
<head>
<title>Session check
</title>
</head>
<body>
<?php 
$_SESSION["name"]=$_POST["username"];//to get the session data from the form
?>
</body>
</html>


Hope it's clear...if any other clarification or doubt is there just feel free to ask...

IIM
Junior Poster
165 posts since Jun 2011
Reputation Points: 46
Solved Threads: 37
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: