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?
Posting more than two values
Moderator: General Moderators
-
AhmedHussain
- Forum Newbie
- Posts: 1
- Joined: Wed Jul 30, 2008 4:06 am
Re: Posting more than two values
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
page1.php:AhmedHussain wrote:is any tell me how i can post more than two values from one form to another, stored in a combo?
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>Code: Select all
<?php
print("Here's your combo sir: <select>");
foreach($_POST as $key => $value) print("<option value='$key'>$value</option>");
print("</select>");
?>