simple question regarding moving data from one page onward
Posted: Fri Jul 28, 2006 10:11 pm
Okay ill admit im new, but ive read quite a few tutorials now and for some reason what I type is not causing the result i want, I assure you this is an easy question that I should have picked up but for one reason or another have not.
I am writing my frist script, this script shouldnt use a database so remember that when you see my horrible programming below, this script will just ask for data from user and do a calculation based on that data for loan availibility for retirement plans, this is my excuse to study at work, so that I may write a script that will help.
My problem is that I want to take data from a user on page1 and recall that data on page 4, each is its seperate page, and i have as you will see below passed the data using the POST feature, heres my script so far (the parts that i assume are causing the problem)
This is one of the commands I have used at the beginning to input user data, its transmitted through POST: (yes this is in a php form sending to second page)
The next page takes the data (i thought and assigns it to variables:
And on the last page I am calling this data using:
I know im doing something wrong here, I just cannot figure it out, using my books the theory seems right
PS: i know thres probably a much simplier way to do this but I am just learning so im seeing if i can get something to work, in reality this script will calculate these values instead of just display them, but for testing i displayed them, assuming i had already messed something up.
Thanks for the help in advance, I am trying i promise
PSS: i forgot to mention, the problem is there is nothing displayed for those variables, all other echos work except those variables that i inevitably passed using an incorrect idea
I am writing my frist script, this script shouldnt use a database so remember that when you see my horrible programming below, this script will just ask for data from user and do a calculation based on that data for loan availibility for retirement plans, this is my excuse to study at work, so that I may write a script that will help.
My problem is that I want to take data from a user on page1 and recall that data on page 4, each is its seperate page, and i have as you will see below passed the data using the POST feature, heres my script so far (the parts that i assume are causing the problem)
This is one of the commands I have used at the beginning to input user data, its transmitted through POST: (yes this is in a php form sending to second page)
Code: Select all
echo "<tr>
<td alighn = 'right'> <B>Enter Active Loans:</br></td>
<td><input type='text' name='aloan1' size='65' maxlegnth='65'>
</td>
</tr>";The next page takes the data (i thought and assigns it to variables:
Code: Select all
global $aloan1;
$aloan1 = $_REQUEST['aloan1'];Code: Select all
global $aloan1;
echo $aloan1;I know im doing something wrong here, I just cannot figure it out, using my books the theory seems right
PS: i know thres probably a much simplier way to do this but I am just learning so im seeing if i can get something to work, in reality this script will calculate these values instead of just display them, but for testing i displayed them, assuming i had already messed something up.
Thanks for the help in advance, I am trying i promise
PSS: i forgot to mention, the problem is there is nothing displayed for those variables, all other echos work except those variables that i inevitably passed using an incorrect idea