Connecting Tech Pros Worldwide Help | Site Map

Implode Help

  #1  
Old July 17th, 2005, 05:58 AM
Jeff
Guest
 
Posts: n/a
Hello.

Quick background as I dont wish to hog anyones time. I am a customer of a
PHP/SQL programmer. A website that I had the programmer build for me is
working great, with one exception.

I have limited programming experience, most of it Pascal/C++ and I haven't
programmed for many years now even then it was mediocre programming of small
this and thats.

Here is the code:

-----------------------------------------------------------------------

function check_deliver_price($product_id, $product_quantity, $price_level,
$delivery_city_address, $delivery_state_address, $delivery_zip,
$values_price_inc)

{

global $db_prefix, $ups_dropOffChoice, $ups_container, $ups_billToUPS,
$ups_currency, $ups_document, $ups_22_destCountry, $ups_origCity,
$ups_15_origPostal, $ups_14_origCountry, $ups_13_product, $ups_10_action;

$result = 0;

@$result = mysql_query("select * from ".$db_prefix."_products WHERE
id='$product_id'");

@$myrow = mysql_fetch_array($result);

$value = $myrow['price_'.$price_level.'_level'] + $values_price_inc;

if ($value < 100) {$value = 100;}

$html = implode ('', file
('http://wwwapps.ups.com/ctc/htmlTool?accept_UPS_license_agreement=yes&destR
esident=01&49_residential=1&10_action='.$ups_10_ac tion.'&13_product='.$ups_1
3_product.'&14_origCountry='.$ups_14_origCountry.' &origCity='.$ups_origCity.
'&15_origPostal='.$ups_15_origPostal.'&22_destCoun try='.$ups_22_destCountry.
'&shipDate='.date("Y-m-d").'&document='.$ups_document.'&currency='.$ups_c urr
ency.'&container='.$ups_container.'&billToUPS='.$u ps_billToUPS.'&dropOffChoi
ce='.$ups_dropOffChoice.'&20_destCity='.$delivery_ city_address.'&19_destPost
al='.$delivery_zip.'&23_weight='.$myrow['weight'].'&24_value='.$value.'&25_l
ength='.$myrow['size_x'].'&26_width='.$myrow['size_y'].'&27_height='.$myrow[
'size_z']));

if (strstr($html, 'UPS United States'))

{

if (strstr($html, 'Provide Package Information'))

{

$result = 0;

}

elseif (strstr($html, 'Provide Shipment Information'))

{

$result = -1;

}

elseif (strstr($html, 'Detailed Results'))

{

eregi('Shipment Total:</span><img alt="" height="1" src="/img/1.gif"
width="12">(.+)<img alt="" height="1" src="/img/1.gif" width="6"><span
class="bold">USD</span></div></td>', $html, $temp);

$result = $temp[1];

}

else

{

order_step_1('', '', '', 'delivery_address_incorrect');

break;

}

}

if ($result < 0) {order_step_1('', '', '', 'delivery_address_incorrect');}

if ($myrow['price_'.$price_level.'_shipping'] == 1) {$result = 0;}

$result = $result * $product_quantity;

return $result;

}


-----------------------------------------------------------------------

Basically, from what I can gather, its looking within the webpage result
from UPS to see if something exists, in essence to give the
"check_deliver_price" function a result.

The use of "implode" in the above code (as in any PHP coding I would
imagine) is a concatenation function from what I can tell by my research.

However, it seems that the implode function call as used above is stripping
the space in between a customers City address (ie. Santa Fe, Los Angelos,
etc.) creating a situation where "Santa Fe" would be just "Santa" by the
time it is concatenated. Therefore, only "Santa" gets passed onto UPS by
use of the URL, which of course UPS returns an error.

Only customers with a space in the city name have this issue. Now, my
programmer while capable of resolving this issue, is absent and since she is
not even in the US, I cannot contact her.

I am asking the NG for any help in modifying the above code or any
suggestions as to what I can do. I dont mind keeping backups of her coding,
then modifying the original.. besides, I dont imagine I could make matters
much worse, since the "check_deliver_price" function is called both for
address verfication upon customer sign up, but, to find out the delivery
charges of the products that they purchase.

The key portion of the code (I think) would be:

$html = implode ('', file
('http://wwwapps.ups.com/ctc/htmlTool?accept_UPS_license_agreement=yes&destR
esident=01&49_residential=1&10_action='.$ups_10_ac tion.'&13_product='.$ups_1
3_product.'&14_origCountry='.$ups_14_origCountry.' &origCity='.$ups_origCity.
'&15_origPostal='.$ups_15_origPostal.'&22_destCoun try='.$ups_22_destCountry.
'&shipDate='.date("Y-m-d").'&document='.$ups_document.'&currency='.$ups_c urr
ency.'&container='.$ups_container.'&billToUPS='.$u ps_billToUPS.'&dropOffChoi
ce='.$ups_dropOffChoice.'&20_destCity='.$delivery_ city_address.'&19_destPost
al='.$delivery_zip.'&23_weight='.$myrow['weight'].'&24_value='.$value.'&25_l
ength='.$myrow['size_x'].'&26_width='.$myrow['size_y'].'&27_height='.$myrow[
'size_z']));


What I seek is an overall resolution to the code sniplet, though, I think if
I can find out from anyone here on how to fill in any spaces that may exist
in the $delivery_city_address variable with a %20, that would pretty much
resolve my issue?

Any guideance would be greatly appreciated, albeit, a modified code
resolving my issue would make it much easier and would be the most
appreciated assistance for this wannabe PHP programmer. :)

Jeff


  #2  
Old July 17th, 2005, 05:58 AM
Geoff Berrow
Guest
 
Posts: n/a

re: Implode Help


I noticed that Message-ID: <4r2jc.13825$2e6.5228@lakeread01> from Jeff
contained the following:
[color=blue]
>What I seek is an overall resolution to the code sniplet, though, I think if
>I can find out from anyone here on how to fill in any spaces that may exist
>in the $delivery_city_address variable with a %20, that would pretty much
>resolve my issue?[/color]

The implode isn't doing it.

http://uk.php.net/manual/en/function.urlencode.php
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
  #3  
Old July 17th, 2005, 05:59 AM
Jeff
Guest
 
Posts: n/a

re: Implode Help


"Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
news:u6ep80tvde7l00ksrt284bopd5lsjf31ko@4ax.com...[color=blue]
> I noticed that Message-ID: <4r2jc.13825$2e6.5228@lakeread01> from Jeff
> contained the following:
>[color=green]
> >What I seek is an overall resolution to the code sniplet, though, I think[/color][/color]
if[color=blue][color=green]
> >I can find out from anyone here on how to fill in any spaces that may[/color][/color]
exist[color=blue][color=green]
> >in the $delivery_city_address variable with a %20, that would pretty much
> >resolve my issue?[/color]
>
> The implode isn't doing it.
>
> http://uk.php.net/manual/en/function.urlencode.php
> --
> Geoff Berrow (put thecat out to email)
> It's only Usenet, no one dies.
> My opinions, not the committee's, mine.
> Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]

Geoff,

Thank you very much for your assistance. I am reading and trying to gather
what I can using the link provided. While I am interested in learning PHP,
Im affraid that I might not figure things out until some time has passed.

If you or anyone else wouldn't mind rearranging/modifying the supplied code
so that it will work in the case where the city (or any other variable for
that matter I suppose) has a space in it, I would be very much in your debt.

I'll be watching intently to see if someone who doesnt mind doing this for
me, makes the changes.

I try to contribute where I can, unfortunately this is just one of those
NG's I cannot really contribute anything, but rather this is one that Im
visiting strictly as the collector vice contributor. :(

Jeff


  #4  
Old July 17th, 2005, 05:59 AM
Geoff Berrow
Guest
 
Posts: n/a

re: Implode Help


I noticed that Message-ID: <s07jc.13972$2e6.2485@lakeread01> from Jeff
contained the following:
[color=blue]
>Geoff,
>
>Thank you very much for your assistance. I am reading and trying to gather
>what I can using the link provided. While I am interested in learning PHP,
>Im affraid that I might not figure things out until some time has passed.[/color]

Sorry, from your response I guessed you were more savvy.

Try this: (you will probably have to get rid of the line wraps to make
it work)

$url='http://wwwapps.ups.com/ctc/htmlTool?accept_UPS_license_agreement=yes&destR
esident=01&49_residential=1&10_action='.$ups_10_ac tion.'&13_product='.$ups_1
3_product.'&14_origCountry='.$ups_14_origCountry.' &origCity='.$ups_origCity.
'&15_origPostal='.$ups_15_origPostal.'&22_destCoun try='.$ups_22_destCountry.
'&shipDate='.date("Y-m-d").'&document='.$ups_document.'&currency='.$ups_c urr
ency.'&container='.$ups_container.'&billToUPS='.$u ps_billToUPS.'&dropOffChoi
ce='.$ups_dropOffChoice.'&20_destCity='.$delivery_ city_address.'&19_destPost
al='.$delivery_zip.'&23_weight='.$myrow['weight'].'&24_value='.$value.'&25_l
ength='.$myrow['size_x'].'&26_width='.$myrow['size_y'].'&27_height='.$myrow[
'size_z'];

$html = implode ('', file(urlencode($url)));

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
  #5  
Old July 17th, 2005, 05:59 AM
Virgil Green
Guest
 
Posts: n/a

re: Implode Help


"Jeff" <jeffh@ariven.com> wrote in message
news:s07jc.13972$2e6.2485@lakeread01...[color=blue]
> "Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
> news:u6ep80tvde7l00ksrt284bopd5lsjf31ko@4ax.com...[color=green]
> > I noticed that Message-ID: <4r2jc.13825$2e6.5228@lakeread01> from Jeff
> > contained the following:
> >[color=darkred]
> > >What I seek is an overall resolution to the code sniplet, though, I[/color][/color][/color]
think[color=blue]
> if[color=green][color=darkred]
> > >I can find out from anyone here on how to fill in any spaces that may[/color][/color]
> exist[color=green][color=darkred]
> > >in the $delivery_city_address variable with a %20, that would pretty[/color][/color][/color]
much[color=blue][color=green][color=darkred]
> > >resolve my issue?[/color]
> >
> > The implode isn't doing it.
> >
> > http://uk.php.net/manual/en/function.urlencode.php
> > --
> > Geoff Berrow (put thecat out to email)
> > It's only Usenet, no one dies.
> > My opinions, not the committee's, mine.
> > Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]
>
> Geoff,
>
> Thank you very much for your assistance. I am reading and trying to[/color]
gather[color=blue]
> what I can using the link provided. While I am interested in learning[/color]
PHP,[color=blue]
> Im affraid that I might not figure things out until some time has passed.
>
> If you or anyone else wouldn't mind rearranging/modifying the supplied[/color]
code[color=blue]
> so that it will work in the case where the city (or any other variable for
> that matter I suppose) has a space in it, I would be very much in your[/color]
debt.[color=blue]
>
> I'll be watching intently to see if someone who doesnt mind doing this for
> me, makes the changes.
>
> I try to contribute where I can, unfortunately this is just one of those
> NG's I cannot really contribute anything, but rather this is one that Im
> visiting strictly as the collector vice contributor. :([/color]

Untested:

$html = implode ('', file
('http://wwwapps.ups.com/ctc/htmlTool?accept_UPS_license_agreement=yes&destR
esident=01&49_residential=1&10_action='.$ups_10_ac tion.'&13_product='.$ups_1
3_product.'&14_origCountry='.urlencode($ups_14_ori gCountry).'&origCity='.url
encode($ups_origCity).
'&15_origPostal='.$ups_15_origPostal.'&22_destCoun try='.urlencode($ups_22_de
stCountry).
'&shipDate='.date("Y-m-d").'&document='.$ups_document.'&currency='.$ups_c urr
ency.'&container='.$ups_container.'&billToUPS='.$u ps_billToUPS.'&dropOffChoi
ce='.$ups_dropOffChoice.'&20_destCity='.url_encode ($delivery_city_address).'
&19_destPost
al='.$delivery_zip.'&23_weight='.$myrow['weight'].'&24_value='.$value.'&25_l
ength='.$myrow['size_x'].'&26_width='.$myrow['size_y'].'&27_height='.$myrow[
'size_z']));

- Virgil


  #6  
Old July 17th, 2005, 05:59 AM
Jeff
Guest
 
Posts: n/a

re: Implode Help



"Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
news:9r9q80h6836upeaa5pvjhcrfp6j5dk0thv@4ax.com...[color=blue]
> I noticed that Message-ID: <s07jc.13972$2e6.2485@lakeread01> from Jeff
> contained the following:
>[color=green]
> >Geoff,
> >
> >Thank you very much for your assistance. I am reading and trying to[/color][/color]
gather[color=blue][color=green]
> >what I can using the link provided. While I am interested in learning[/color][/color]
PHP,[color=blue][color=green]
> >Im affraid that I might not figure things out until some time has passed.[/color]
>
> Sorry, from your response I guessed you were more savvy.
>
> Try this: (you will probably have to get rid of the line wraps to make
> it work)
>
>[/color]
$url='http://wwwapps.ups.com/ctc/htmlTool?accept_UPS_license_agreement=yes&d
estR[color=blue]
>[/color]
esident=01&49_residential=1&10_action='.$ups_10_ac tion.'&13_product='.$ups_1[color=blue]
>[/color]
3_product.'&14_origCountry='.$ups_14_origCountry.' &origCity='.$ups_origCity.[color=blue]
>[/color]
'&15_origPostal='.$ups_15_origPostal.'&22_destCoun try='.$ups_22_destCountry.[color=blue]
>[/color]
'&shipDate='.date("Y-m-d").'&document='.$ups_document.'&currency='.$ups_c urr[color=blue]
>[/color]
ency.'&container='.$ups_container.'&billToUPS='.$u ps_billToUPS.'&dropOffChoi[color=blue]
>[/color]
ce='.$ups_dropOffChoice.'&20_destCity='.$delivery_ city_address.'&19_destPost[color=blue]
>[/color]
al='.$delivery_zip.'&23_weight='.$myrow['weight'].'&24_value='.$value.'&25_l[color=blue]
>[/color]
ength='.$myrow['size_x'].'&26_width='.$myrow['size_y'].'&27_height='.$myrow[[color=blue]
> 'size_z'];
>
> $html = implode ('', file(urlencode($url)));
>
> --
> Geoff Berrow (put thecat out to email)
> It's only Usenet, no one dies.
> My opinions, not the committee's, mine.
> Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]

Geoff,

On a good day perhaps, just not today. ;) I am the customer in this
situation, waiting patiently (or trying) for the webmaster to make her
presence known again. What I do know of PHP, I learned in just two days
time, or roughly 48 continous hours, so sleep deprevation is winning the
battle right now.

I'll give that a shot and will be sure to let you know the outcome, but
either way, my appreciation is present. I thank you for taking out time of
your (based upon my assumption of what career field you are in) busy
schedule.

Jeff


  #7  
Old July 17th, 2005, 05:59 AM
Jeff
Guest
 
Posts: n/a

re: Implode Help



"Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
news:9r9q80h6836upeaa5pvjhcrfp6j5dk0thv@4ax.com...[color=blue]
> I noticed that Message-ID: <s07jc.13972$2e6.2485@lakeread01> from Jeff
> contained the following:
>[color=green]
> >Geoff,
> >
> >Thank you very much for your assistance. I am reading and trying to[/color][/color]
gather[color=blue][color=green]
> >what I can using the link provided. While I am interested in learning[/color][/color]
PHP,[color=blue][color=green]
> >Im affraid that I might not figure things out until some time has passed.[/color]
>
> Sorry, from your response I guessed you were more savvy.
>
> Try this: (you will probably have to get rid of the line wraps to make
> it work)
>
>[/color]
$url='http://wwwapps.ups.com/ctc/htmlTool?accept_UPS_license_agreement=yes&d
estR[color=blue]
>[/color]
esident=01&49_residential=1&10_action='.$ups_10_ac tion.'&13_product='.$ups_1[color=blue]
>[/color]
3_product.'&14_origCountry='.$ups_14_origCountry.' &origCity='.$ups_origCity.[color=blue]
>[/color]
'&15_origPostal='.$ups_15_origPostal.'&22_destCoun try='.$ups_22_destCountry.[color=blue]
>[/color]
'&shipDate='.date("Y-m-d").'&document='.$ups_document.'&currency='.$ups_c urr[color=blue]
>[/color]
ency.'&container='.$ups_container.'&billToUPS='.$u ps_billToUPS.'&dropOffChoi[color=blue]
>[/color]
ce='.$ups_dropOffChoice.'&20_destCity='.$delivery_ city_address.'&19_destPost[color=blue]
>[/color]
al='.$delivery_zip.'&23_weight='.$myrow['weight'].'&24_value='.$value.'&25_l[color=blue]
>[/color]
ength='.$myrow['size_x'].'&26_width='.$myrow['size_y'].'&27_height='.$myrow[[color=blue]
> 'size_z'];
>
> $html = implode ('', file(urlencode($url)));
>
> --
> Geoff Berrow (put thecat out to email)
> It's only Usenet, no one dies.
> My opinions, not the committee's, mine.
> Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]


Geoff,

Your code didn't do the trick unfortunately. :( Not sure of why it didnt,
but, it instead made every address return an error (more less). Does the
fact that the original code has a @ before the $html have anything to do
with it? Or, do I have to declare $url somewhere?

Thank you for the attempt, Im sure it would have worked in the hands of a
real programmer vice a wannabe :)

Jeff


  #8  
Old July 17th, 2005, 05:59 AM
Jeff
Guest
 
Posts: n/a

re: Implode Help



"Virgil Green" <vjg@obsydian.com> wrote in message
news:%9ajc.2141$Wl5.1333@newssvr23.news.prodigy.co m...[color=blue]
> "Jeff" <jeffh@ariven.com> wrote in message
> news:s07jc.13972$2e6.2485@lakeread01...[color=green]
> > "Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
> > news:u6ep80tvde7l00ksrt284bopd5lsjf31ko@4ax.com...[color=darkred]
> > > I noticed that Message-ID: <4r2jc.13825$2e6.5228@lakeread01> from Jeff
> > > contained the following:
> > >
> > > >What I seek is an overall resolution to the code sniplet, though, I[/color][/color]
> think[color=green]
> > if[color=darkred]
> > > >I can find out from anyone here on how to fill in any spaces that may[/color]
> > exist[color=darkred]
> > > >in the $delivery_city_address variable with a %20, that would pretty[/color][/color]
> much[color=green][color=darkred]
> > > >resolve my issue?
> > >
> > > The implode isn't doing it.
> > >
> > > http://uk.php.net/manual/en/function.urlencode.php
> > > --
> > > Geoff Berrow (put thecat out to email)
> > > It's only Usenet, no one dies.
> > > My opinions, not the committee's, mine.
> > > Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]
> >
> > Geoff,
> >
> > Thank you very much for your assistance. I am reading and trying to[/color]
> gather[color=green]
> > what I can using the link provided. While I am interested in learning[/color]
> PHP,[color=green]
> > Im affraid that I might not figure things out until some time has[/color][/color]
passed.[color=blue][color=green]
> >
> > If you or anyone else wouldn't mind rearranging/modifying the supplied[/color]
> code[color=green]
> > so that it will work in the case where the city (or any other variable[/color][/color]
for[color=blue][color=green]
> > that matter I suppose) has a space in it, I would be very much in your[/color]
> debt.[color=green]
> >
> > I'll be watching intently to see if someone who doesnt mind doing this[/color][/color]
for[color=blue][color=green]
> > me, makes the changes.
> >
> > I try to contribute where I can, unfortunately this is just one of those
> > NG's I cannot really contribute anything, but rather this is one that Im
> > visiting strictly as the collector vice contributor. :([/color]
>
> Untested:
>
> $html = implode ('', file
>[/color]
('http://wwwapps.ups.com/ctc/htmlTool?accept_UPS_license_agreement=yes&destR[color=blue]
>[/color]
esident=01&49_residential=1&10_action='.$ups_10_ac tion.'&13_product='.$ups_1[color=blue]
>[/color]
3_product.'&14_origCountry='.urlencode($ups_14_ori gCountry).'&origCity='.url[color=blue]
> encode($ups_origCity).
>[/color]
'&15_origPostal='.$ups_15_origPostal.'&22_destCoun try='.urlencode($ups_22_de[color=blue]
> stCountry).
>[/color]
'&shipDate='.date("Y-m-d").'&document='.$ups_document.'&currency='.$ups_c urr[color=blue]
>[/color]
ency.'&container='.$ups_container.'&billToUPS='.$u ps_billToUPS.'&dropOffChoi[color=blue]
>[/color]
ce='.$ups_dropOffChoice.'&20_destCity='.url_encode ($delivery_city_address).'[color=blue]
> &19_destPost
>[/color]
al='.$delivery_zip.'&23_weight='.$myrow['weight'].'&24_value='.$value.'&25_l[color=blue]
>[/color]
ength='.$myrow['size_x'].'&26_width='.$myrow['size_y'].'&27_height='.$myrow[[color=blue]
> 'size_z']));
>
> - Virgil
>
>[/color]

Virgil,

This did the trick, thank you very much. A slight error where you have:

&20_destCity='.url_encode.....
vice
&20_destCity='.urlencode...

but, that was easy enough to pin point... it returned a completely blank
page with it as url_encode, which now Im intrigued as to why it does that
<shrug>

Thank you very much everyone. I know I wasn't the easiest to work with (as
ignorant of PHP as I am) so I appreciate the patience.

Jeff

PS - Nope, Im not gone forever. I plan to stick around to learn this PHP
jazz they call programming. ;)


  #9  
Old July 17th, 2005, 05:59 AM
Virgil Green
Guest
 
Posts: n/a

re: Implode Help


"Jeff" <jeffh@ariven.com> wrote in message news:4ybjc.2$f_5.0@lakeread01...[color=blue]
>
> "Virgil Green" <vjg@obsydian.com> wrote in message
> news:%9ajc.2141$Wl5.1333@newssvr23.news.prodigy.co m...[color=green]
> > "Jeff" <jeffh@ariven.com> wrote in message
> > news:s07jc.13972$2e6.2485@lakeread01...
> >
> > Untested:
> >
> > $html = implode ('', file
> >[/color]
>[/color]
('http://wwwapps.ups.com/ctc/htmlTool?accept_UPS_license_agreement=yes&destR[color=blue][color=green]
> >[/color]
>[/color]
esident=01&49_residential=1&10_action='.$ups_10_ac tion.'&13_product='.$ups_1[color=blue][color=green]
> >[/color]
>[/color]
3_product.'&14_origCountry='.urlencode($ups_14_ori gCountry).'&origCity='.url[color=blue][color=green]
> > encode($ups_origCity).
> >[/color]
>[/color]
'&15_origPostal='.$ups_15_origPostal.'&22_destCoun try='.urlencode($ups_22_de[color=blue][color=green]
> > stCountry).
> >[/color]
>[/color]
'&shipDate='.date("Y-m-d").'&document='.$ups_document.'&currency='.$ups_c urr[color=blue][color=green]
> >[/color]
>[/color]
ency.'&container='.$ups_container.'&billToUPS='.$u ps_billToUPS.'&dropOffChoi[color=blue][color=green]
> >[/color]
>[/color]
ce='.$ups_dropOffChoice.'&20_destCity='.url_encode ($delivery_city_address).'[color=blue][color=green]
> > &19_destPost
> >[/color]
>[/color]
al='.$delivery_zip.'&23_weight='.$myrow['weight'].'&24_value='.$value.'&25_l[color=blue][color=green]
> >[/color]
>[/color]
ength='.$myrow['size_x'].'&26_width='.$myrow['size_y'].'&27_height='.$myrow[[color=blue][color=green]
> > 'size_z']));
> >
> > - Virgil
> >
> >[/color]
>
> Virgil,
>
> This did the trick, thank you very much. A slight error where you have:
>
> &20_destCity='.url_encode.....
> vice
> &20_destCity='.urlencode...
>
> but, that was easy enough to pin point... it returned a completely blank
> page with it as url_encode, which now Im intrigued as to why it does that
> <shrug>
>
> Thank you very much everyone. I know I wasn't the easiest to work with[/color]
(as[color=blue]
> ignorant of PHP as I am) so I appreciate the patience.[/color]

You're welcome... and if you think you were "troublesome"... you haven't
seen troublesome. Your question was researched, you showed your code, you
expained what you thought was wrong, and you told us what you expected. That
was refreshing.

Glad to have helped.

- Virgil


  #10  
Old July 17th, 2005, 05:59 AM
Geoff Berrow
Guest
 
Posts: n/a

re: Implode Help


I noticed that Message-ID:
<AWbjc.2164$y46.1669@newssvr23.news.prodigy.com> from Virgil Green
contained the following:
[color=blue]
>You're welcome... and if you think you were "troublesome"... you haven't
>seen troublesome. Your question was researched, you showed your code, you
>expained what you thought was wrong, and you told us what you expected. That
>was refreshing.[/color]

I'd agree with that and though I'm pleased I was on the right lines I'm
sorry my effort did not work.

Was I wrong to suggest doing it the way I did?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
  #11  
Old July 17th, 2005, 05:59 AM
Virgil Green
Guest
 
Posts: n/a

re: Implode Help


"Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
news:mfjq805t1p0163844uo7ajl5go32osqbbp@4ax.com...[color=blue]
> I noticed that Message-ID:
> <AWbjc.2164$y46.1669@newssvr23.news.prodigy.com> from Virgil Green
> contained the following:
>[color=green]
> >You're welcome... and if you think you were "troublesome"... you haven't
> >seen troublesome. Your question was researched, you showed your code, you
> >expained what you thought was wrong, and you told us what you expected.[/color][/color]
That[color=blue][color=green]
> >was refreshing.[/color]
>
> I'd agree with that and though I'm pleased I was on the right lines I'm
> sorry my effort did not work.
>
> Was I wrong to suggest doing it the way I did?[/color]

Only because you were doing the entire URL rather than just the query
string. Your method caused the : and the // of the http:// string to be
replaced as well along with the /s (if there were any) separating host from
directory name information.. and the ? separating the query string from the
rest of the URL. Only the query string (and even then, only parts of it)
needed to be encoded.

However, I picked up the need for the urlencode() function from your post.
Before I saw that, I had decided to skip over the post because I didn't have
time at the moment to decipher it.

- Virgil.


  #12  
Old July 17th, 2005, 05:59 AM
Geoff Berrow
Guest
 
Posts: n/a

re: Implode Help


I noticed that Message-ID:
<dggjc.2238$3u.480@newssvr23.news.prodigy.com> from Virgil Green
contained the following:
[color=blue][color=green]
>>
>> Was I wrong to suggest doing it the way I did?[/color]
>
>Only because you were doing the entire URL rather than just the query
>string. Your method caused the : and the // of the http:// string to be
>replaced as well along with the /s (if there were any) separating host from
>directory name information.. and the ? separating the query string from the
>rest of the URL. Only the query string (and even then, only parts of it)
>needed to be encoded.[/color]

Hmmm, I thought it would still work. Ah well, you learn something every
day.[color=blue]
>
>However, I picked up the need for the urlencode() function from your post.
>Before I saw that, I had decided to skip over the post because I didn't have
>time at the moment to decipher it.[/color]

Teamwork <g>
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with implode function scatfly answers 1 May 30th, 2007 08:32 PM
how to 'implode' a URL ?? Rob answers 6 July 17th, 2005 03:07 AM
Using implode with Windows UNC path names. Shawn Campbell answers 3 July 16th, 2005 11:54 PM
Trouble with implode. Andreas Paasch answers 5 July 16th, 2005 11:53 PM