Re: [PHP] Re: Seperating a textarea into 3 different variables

2001-09-08 Thread Richard Kurth

Hello Gaylen,
I am not sure what worldpay uses as an operating system but this work
just perfect. Thanks

Saturday, September 08, 2001, 6:09:08 PM, you wrote:

Gaylen Fraley> Is this under Windows?  If so, it's probably passing \r\n : carriage
Gaylen Fraley> return/line feed.  Check for both.


Gaylen Fraley> --
Gaylen Fraley> Gaylen

Gaylen Fraley> "Richard Kurth" <[EMAIL PROTECTED]> wrote in message
Gaylen Fraley> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> I have a problem I am trying to set up a credit card form for worldpay
>>
>> And in the address field that I have to send to them it has to go in
>> a textarea 
>>
>> So when you fill this in it would look like this
>>
>> address
>> city
>> state
>>
>> Now this works fine for sending them the data but when the data is
>> sent back it is also in this format
>> address
>> city
>> state
>>
>> I need to separate it into Address, city, state so it is 3 different
>> variables
>>
>> I have tried
>> $saddress=explode ("
",$address);
>> $address1=$saddress[0];
>> $city=$saddress[1];
>> $state=$saddress[2];
>>
>> 
  is the the new line character
>>
>> I have also tried /n and /s  but none of these work
>>
>> When I echo the $address to the screen it shows as address city state
>> but when I vew the code from the browser it shows it as
>> address
>> city
>> state
>>
>> So I assume that it is passing a new line character
>>
>> Does anybody have a solution for this
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Best regards,
>>  Richard
>> mailto:[EMAIL PROTECTED]
>>






-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Seperating a textarea into 3 different variables

2001-09-08 Thread Richard Lynch

Use something like this to find out what character is *REALLY* in the stuff
coming from worldpay:

for($i = 0; $i < strlen($worldpay_address); $i++){
$char = $worldpay_address[$i];
if (($ord = ord($char)) < 32){
echo "$char[$ord]";
}
else{
echo $char;
}
}
Another option is to not rely on worldpay to return your address info at
all.

Just store the info (except for credit card) and give them a unique id in
the transaction, and you only look at the transaction ID to snag all the
other info.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Richard Kurth <[EMAIL PROTECTED]>
Newsgroups: php.general
To: php <[EMAIL PROTECTED]>
Sent: Saturday, September 08, 2001 6:50 PM
Subject: Seperating a textarea into 3 different variables


> I have a problem I am trying to set up a credit card form for worldpay
>
> And in the address field that I have to send to them it has to go in
> a textarea 
>
> So when you fill this in it would look like this
>
> address
> city
> state
>
> Now this works fine for sending them the data but when the data is
> sent back it is also in this format
> address
> city
> state
>
> I need to separate it into Address, city, state so it is 3 different
> variables
>
> I have tried
> $saddress=explode ("
",$address);
> $address1=$saddress[0];
> $city=$saddress[1];
> $state=$saddress[2];
>
> 
  is the the new line character
>
> I have also tried /n and /s  but none of these work
>
> When I echo the $address to the screen it shows as address city state
> but when I vew the code from the browser it shows it as
> address
> city
> state
>
> So I assume that it is passing a new line character
>
> Does anybody have a solution for this
>
>
>
>
>
>
>
>
>
>
>
>
> Best regards,
>  Richard
> mailto:[EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Seperating a textarea into 3 different variables

2001-09-08 Thread Gaylen Fraley

Is this under Windows?  If so, it's probably passing \r\n : carriage
return/line feed.  Check for both.


--
Gaylen

"Richard Kurth" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a problem I am trying to set up a credit card form for worldpay
>
> And in the address field that I have to send to them it has to go in
> a textarea 
>
> So when you fill this in it would look like this
>
> address
> city
> state
>
> Now this works fine for sending them the data but when the data is
> sent back it is also in this format
> address
> city
> state
>
> I need to separate it into Address, city, state so it is 3 different
> variables
>
> I have tried
> $saddress=explode ("
",$address);
> $address1=$saddress[0];
> $city=$saddress[1];
> $state=$saddress[2];
>
> 
  is the the new line character
>
> I have also tried /n and /s  but none of these work
>
> When I echo the $address to the screen it shows as address city state
> but when I vew the code from the browser it shows it as
> address
> city
> state
>
> So I assume that it is passing a new line character
>
> Does anybody have a solution for this
>
>
>
>
>
>
>
>
>
>
>
>
> Best regards,
>  Richard
> mailto:[EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]