php post help

Hi experts ! i need guide line for php post
Example:
In A.php i done my calculation , i would like to use form action post to C.php but before that i need go through B.php.
A.php do calculation then next step is B.php let user enter information final step is C.php show information of A.php + B.php

A.php coding example:

<form action='C.php'  method='POST'>
<input .....>
<input type="submit"   name="Submit"  />
</form>

Hi there,

There are two ways to pass information that you’ve collected in your first script, through to your second script, and into your third script. The first one is to create a hidden field and populate it with the information that you received from the first script:
[php][/php]

Or the second way you could do it it by using SESSIONS. You do this by adding session_start(); at the top of every page and on your second page do the following:
[php]<?php
session_start();
$_SESSION[‘info’] = $_POST[‘info’];

// Some more code…
?>[/php]

You would then use $_SESSION[‘info’] on your third script to use the value you passed. What you use is up to you they both work and do what you need.

Hope this helps.

Sponsor our Newsletter | Privacy Policy | Terms of Service