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

Re: Re: question about forwarding variables to php from perl

by SquireJames (Monk)
on Dec 15, 2003 at 08:54 UTC ( #314784=note: print w/replies, xml ) Need Help??

in reply to Re: question about forwarding variables to php from perl
in thread question about forwarding variables to php from perl

So, how do the variables that you want to pass enter the message?

For example, if there is a space between each variable and an equals sign between each value (ie. var1=var1 var2=var2 var3=var3), and they are just entered in on ine line, you'd probably want something like this:

chomp $body; # To get rid of the Carriage Return from the STDIN foreach my $temp (split(/ /,$body)) { # This will generate a loop for +each variable/value pair by splitting on spaces my @variable = split (/=/,$temp); # This splits by the equals sign + that is delimiting our values and variable names $vars{$variable[0]} = $variable[1]; # So generate a hash of the va +riable name and the variable value }
This will allow you to generate the proper hash that you need to pass.
As far as the web stuff goes, I'd better leave that to somebody else as I really haven't got a huge amount of experience with it, but it looks OK to me.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2023-06-08 14:10 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (32 votes). Check out past polls.