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

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2022-07-06 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?