Transfer of elements between forms?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
coolin
Forum Newbie
Posts: 21
Joined: Sun Mar 16, 2008 1:44 pm

Transfer of elements between forms?

Post by coolin »

Hi I'm trying to transfer elements between forms after submiting a form . I am tweaking code using PHP/HTML/javascript though still being a rookie am not sure if there is a command or common script available to do this ie. first form submits a text keyword input from user & I would like this to show up as a value in the following form on the next page I'm developing. I am wondering if anyone might be able to point me in the right direction if this is possible Please :?
robseek
Forum Newbie
Posts: 7
Joined: Fri Apr 11, 2008 10:19 am

Re: Transfer of elements between forms?

Post by robseek »

It's quite an interesting problem you have here, but the way I think it could be follows:

First Form:

Code: Select all

 
<form action="otherform.php" method="post">
<input type="text" name="input" size="20" />
</form>
 
Second Form Code:

Code: Select all

 
$input = $_POST['input'];
echo "<form action=' ' method=' '>";
echo "<input type='text' name='receive' value='". $input ."' />";
echo "</form>";
 
 
coolin
Forum Newbie
Posts: 21
Joined: Sun Mar 16, 2008 1:44 pm

Re: Transfer of elements between forms?

Post by coolin »

Thanks very much, this seems the way to go using php scripting in the absense of any current command or general script (I found out this may be possible with javascript but still entails coding so no advantage I can see) :)
Post Reply