Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: CGI.pm problems

by c-era (Curate)
on Dec 13, 2001 at 22:29 UTC ( #131691=note: print w/ replies, xml ) Need Help??


in reply to Re: CGI.pm problems
in thread CGI.pm problems

The problem with using $query->param('xml') is, they can't send an xml= infront of the xml, the second problem is &; will appear frequently in the xml (which is where I'm losing the data with cgi.pm).

As for the use CGI; I just didn't remove it from the example. It makes no difference if I remove it.


Comment on Re: Re: CGI.pm problems
Select or Download Code
Re: Re: Re: CGI.pm problems
by perrin (Chancellor) on Dec 13, 2001 at 22:39 UTC
    As for the use CGI; I just didn't remove it from the example. It makes no difference if I remove it.

    So this is the "roll-your-own" version? Why didn't you post the CGI.pm version that you're having trouble with? If you want help fixing your CGI.pm code, you will have to actually post it for people to look at.

      That's the problem, I don't even know where to start with using the cgi.pm stuff. Look at the agent I wrote and how it produces its output. Because there is no key-value pair, I can't use param().
        POST'ed data typically does have a key/value pair. To find out what yours is, dump out all of them by using @names = $query->param.

        You can have the people submitting this data use "XML" for the key. They just need to URI encode the XML data, which they are supposed to do anyway.

        You question would be better phrased as "How do I read POST data that was submitted without a parameter name?" You might want to rephrase it and post it again.

Re: Re: Re: CGI.pm problems
by chromatic (Archbishop) on Dec 13, 2001 at 23:28 UTC
    According to a reference here, the ampersand must be converted into an entity in element content. Change that to &; and it'll be more valid. (Think of it this way -- if bare ampersands were allowed, how would you be able to find entities?)

    I suspect that may have a dramatic effect on how CGI.pm works.

      They can't send the data that way (the program they are using is hard coded). It's not suppost to be form data, but they aren't sending it as a multitype, so it comes across as form data.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://131691]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (22)
As of 2014-10-30 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls