Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need help requesting an array -

Posted on 2006-11-03
4
Medium Priority
?
280 Views
Last Modified: 2011-09-20
I have a form (not my form, a pre-packaged shopping cart which I am not able to change the functionality of without starting entirely from scratch)

It submits several values, including one that is submitted as an array.

<select name="id[9]">

and

<select name = "id[10]">

etc.

OK.  So I got the rest of the form values to work, but I cannot get the values of the ids to come across.  If I $REQUEST['id[9]'], I get no value.

If I request just id, I get a value = Array

Does anyone know how I can request the actual values of the array called ID?

Thank you in advance for your help.  This one really stumps me.
0
Comment
Question by:foreverdita
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 17867544
$id = $REQUEST['id'];
echo $id[9];
0
 

Author Comment

by:foreverdita
ID: 17867587
I thought that would work as well.  But it still gives me blank values for the array.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17867605
can you print out:

print_r ( $REQUEST['id']);
0
 

Author Comment

by:foreverdita
ID: 17867609
Duh - my own fault.  I forgot the _ on my $REQUEST

This worked like a charm.  Thank you!!!!!!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question