Re: VERY IMPORTANT question about reading variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sudhakar,
What i got to know of this description is that you can get the variables into the confirm...php page and not into the next step where you need to insert into the database. I feel that you need to declare the variables into the confirmregistration.php file as global variables,
ie 
include('confirmregistration.php');
echo "$username";


 ---------confirmregistration.php
global $username; 
$username = $_POST['username'];
echo $username;


Do this and the code will work .
In case of any difficulty do contact the group again.
Thanks,
--
Regards,
Abhishek jain



----- Original Message ----
From: Sudhakar <finals27@xxxxxxxxx>
To: php-objects@xxxxxxxxxxxxxxx
Sent: Sunday, December 23, 2007 3:13:44 AM
Subject:  VERY IMPORTANT question about reading variables


i have 3 pages = register.html confirmregistration .php 
registration. php

in the register.html page the user enters their details and in 
confirmregistration .php i have displayed all the information that a 
user has entered in register.html to check what they have entered 
with a back button(onclick= 'javascript: history.go(- 1)') and a 
confirm submit button

the registration. php file is the actual file that should take the 
information from confirmregistration .php and insert into database. 

presently confirmregistration .php file displays all the information a 
user has entered and if they click on back button and make changes 
the new changes appear however when they click on register button the 
browser shows registration. php however 
a) the output is what i have written in 
confirmregistration .php and
b) the values that the user entered is blank

i have used an include("confirmreg istration. php") in the 
registration. php in order to read all the information that a user has 
entered.

in confirmregistration .php i have read the values into variables ex = 
$username = $_POST["username" ]; $fname = $_POST["fname" ]; etc

so in registration. php i have an echo statement like = 
echo "value of username is = ".$username; etc for the rest

all these variables are blank they have no value that the user 
entered in register.html

any help will be greatly appreciated. please suggest what needs to be 
done and the code as well.

waiting for a reply.

thanks.





      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux