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
How to pass value of one page's textbox to another page's te
Moderator: General Moderators
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: How to pass value of one page's textbox to another page'
Assuming your first text box is called 'textbox1' you can use the following code on the second page
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
Code: Select all
<input type="text" name="textbox2" value="<?php echo $_POST['textbox1']; ?>" />“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering