Page 1 of 1

How to pass value of one page's textbox to another page's te

Posted: Sat Jul 28, 2012 9:03 am
by premecorp
Hi Friends,

I have one requirement where I have one textbox & submit button, when I click that button by filling value on that textbox I need it will redirect to different page & the value of that textbox automatically come into this page textbox. If any one have any idea kindly help me.


Regards,
Premashish

Re: How to pass value of one page's textbox to another page'

Posted: Sat Jul 28, 2012 4:38 pm
by social_experiment
Assuming your first text box is called 'textbox1' you can use the following code on the second page

Code: Select all

<input type="text" name="textbox2" value="<?php echo $_POST['textbox1']; ?>" />
This will give the textbox (no. 2 that is) the value of textbox 1 when submitted. You could also store the value from the first textbox in a session variable, depending on where the page is submitted. If you can supply more details about what you have in mind that would be helpful