Page 1 of 1

Posting more than two values

Posted: Wed Jul 30, 2008 4:12 am
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?

Re: Posting more than two values

Posted: Wed Jul 30, 2008 11:45 am
by Twayne
Have you looked into sessions? cookies? URLs? IMO I like sessions but I'm a rank newbie too, so ... <g>

Re: Posting more than two values

Posted: Mon Jul 04, 2011 4:34 am
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