Re: PERL to PHP problem
| From: | CC Zona | Date: | Tue, 06 Aug 2002 03:45:22 +0000 |
| Subject: | Re: PERL to PHP problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111329@lists.php.net to get a copy of this message | ||
In article <016b01c23c9f$eb0eaf70$0200a8c0@andypc>,
andy@milonic.com (Andy Woolley) wrote:
> I'm trying to convert this snippet of Perl to PHP and it just wont populate
> the $oid and $status variables. Does anyone know if Perl can do things that
> PHP can't? - Personally I wouldn't have thought so but you live & learn I
> suppose.
>
>
> <Perl code starts here>
> #!/usr/bin/perl
> use CGI;
> use DBI;
>
> my $qs = new CGI();
>
> #- Print MIME header
> print $qs->header();
> print "<b>Doing Transaction </b><br />\n";
>
> my $oid = $qs->param("oid");
> my $status = $qs->param("transactionstatus");
> <Perl code ends>
>
>
> The problem is that $oid and $transactionid are just not there. I'm unsure
> what method the sending server is using. I'm told Java but I have my
> doubts - It's a banks credit card transaction server so it's kinda secret
> and it's https which could be the problem.
What is the PHP code you're using to replicate the above? And where is
there a $transactionid in it? FWIW, if your PHP version is 4.1.0 or above,
then the nearest equivalent of $qs->param() would be the $_REQUEST array.
Otherwise, the variables should be automatically populated if
register_globals is turned on, or else you can populate the variables
yourself by checking the contents of $HTTP_GET_VARS and $HTTP_POST_VARS
arrays.
<b>Doing Transaction </b><br />
<?php $oid= $_REQUEST['oid']; $status= $_REQUEST['transactionstatus']; ?>
--
CC