Re: Seperating a textarea into 3 different variables

From: Date: Sun, 09 Sep 2001 01:09:08 +0000
Subject: Re: Seperating a textarea into 3 different variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66550@lists.php.net to get a copy of this message
Is this under Windows? If so, it's probably passing \r\n : carriage return/line feed. Check for both. -- Gaylen "Richard Kurth" <rkurth@pacifier.com> wrote in message news:17320448372.20010908165048@pacifier.com... > 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 <textarea cols="30" rows="4" > name="address"></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 ("&#10;",$address); > $address1=$saddress[0]; > $city=$saddress[1]; > $state=$saddress[2]; > > &#10; 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:rkurth@pacifier.com >

« previous php.general (#66550) next »