PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Sep 24, 2017 11:25 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Jul 30, 2008 4:12 am 
Offline
Forum Newbie

Joined: Wed Jul 30, 2008 4:06 am
Posts: 1
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?


Top
 Profile  
 
PostPosted: Wed Jul 30, 2008 11:45 am 
Offline
Forum Newbie

Joined: Fri Jun 20, 2008 11:47 am
Posts: 14
Have you looked into sessions? cookies? URLs? IMO I like sessions but I'm a rank newbie too, so ... <g>


Top
 Profile  
 
PostPosted: Mon Jul 04, 2011 4:34 am 
Offline
Forum Regular
User avatar

Joined: Wed Apr 30, 2008 2:34 am
Posts: 794
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:
Syntax: [ Download ] [ Hide ]
<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:
Syntax: [ Download ] [ Hide ]
<?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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group