Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Simple (?) form processing question
Old 08-06-2004, 01:20 AM Simple (?) form processing question
Average Talker

Posts: 15
Trades: 0
Hi - I'm wanting to get the value of the first item in a form, but because the name of the field is dynamically generated, I can't do a typical:

$_REQUEST['foo'];

Is there a way to extract that data without utilizing the name of the field? It will always be the first field to arrive.
new_PHP_er is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-06-2004, 09:52 AM
webwoRRks's Avatar
Ultra Talker

Posts: 426
Location: I hope so
Trades: 0
This may sound dumb - but why use request instead of GET or POST? I've never used it before :P
Also, could you use foreach() to get what you want? Or post another (hidden) field with the value=dynamic field name, then use that to access the variable?
webwoRRks is offline
Reply With Quote
View Public Profile Visit webwoRRks's homepage!
 
Old 08-06-2004, 02:54 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
new PHP er,

You're coming from ASP experience, aren't you? WW is right in that you should pull your parameters out of either the $_POST or $_GET superglobal arrays.

Now for your question: I'm not sure if those arrays are associate or not, but try using a numeric index instead of field name.

Report back and let us know... I'm not in a place where I can test that right now.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Reply     « Reply to Simple (?) form processing question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11684 seconds with 12 queries