Posting more than two values

This forum is for discussing the future of the PHP Developer's Network, as well as for us to get your opinion on things.

This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
AhmedHussain
Forum Newbie
Posts: 1
Joined: Wed Jul 30, 2008 4:06 am

Posting more than two values

Post by AhmedHussain »

Dear All. how r u>
i m a new developer in php world. is any tell me how i can post more than two values from one form to another, stored in a combo?
Twayne
Forum Newbie
Posts: 14
Joined: Fri Jun 20, 2008 11:47 am

Re: Posting more than two values

Post by Twayne »

Have you looked into sessions? cookies? URLs? IMO I like sessions but I'm a rank newbie too, so ... <g>
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: Posting more than two values

Post by Apollo »

AhmedHussain wrote:is any tell me how i can post more than two values from one form to another, stored in a combo?
page1.php:

Code: Select all

<form method='post' action='page2.php'>
Value 1: <input type='text' name='value1'> <br>
Value 2: <input type='text' name='value2'> <br>
Value 3: <input type='text' name='value3'> <br>
<input type='submit'>
</form>
page2.php:

Code: Select all

<?php
print("Here's your combo sir: <select>");
foreach($_POST as $key => $value) print("<option value='$key'>$value</option>");
print("</select>");
?>
(edit) sorry, just realized this was a very old thread.. well better late then never I guess O_o
Post Reply