Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I'm going to assume that you are already using CGI, as you mention @items = param("item");. I don't know anything about PHP, so this may be a reference to a PHP function of the same (fairly obvious)name.

Anyway, going ahead with my assumption, if you are using CGI already, and the above quoted line doesn't work, then there is something wrong as (from perlman:lib:CGI)

FETCHING THE VALUE OR VALUES OF A SINGLE NAMED PARAMETER: @values = $query->param('foo'); -or- $value = $query->param('foo'); Pass the param() method a single argument to fetch the value of the na +med parameter. If the parameter is multivalued (e.g. from multiple se +lections in a scrolling list), you can ask to receive an array. Other +wise the method will return a single value. If a value is not given in the query string, as in the queries ``name1 +=&name2='' or ``name1&name2'', it will be returned as an empty string +. This feature is new in 2.63.

If this is the case, you should post a larger section of your code and possibly the html it is processing (don't forget your <CODE></CODE> tags and possibly <READMORE></READMORE> tags) and the girls and guys here will have a better chance at being able to help you.


In reply to Re: Input arrays to CGI by BrowserUk
in thread Input arrays to CGI by Nightblade

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-25 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found