Page 1 of 1

Problem with Links

Posted: Sun Feb 16, 2003 2:06 am
by eggoz
I have been working on passing values to paypal, and I am stuck. Almost all the links work. Just having problems when I have a link like this one. (click on BUY NOW). And here is my script right now.

Code: Select all

<?php 
$Description = urlencode($a_result&#1111;'Description']); 
$Code = urlencode($a_result&#1111;'Code']);
$Price = urlencode($a_result&#1111;'Price']);
$Count = urlencode($a_result&#1111;'Count']);
$Manufacturer = urlencode($a_result&#1111;'Manufacturer']);
?> 

<a href="https://www.paypal.com/cart/add=1&business=information@aardvarksafety.com&item_name=<? echo $Description; ?>&item_number=<? echo $Code; ?>&amount=<? echo $Price; ?>" target="_blank" class="nolink">Buy Now</a>

I was told to use urlencode, and I see its working, but I still have problems as you can see. Any ideas?

Posted: Sun Feb 16, 2003 3:33 am
by Takuma
There is nothing wrong with your PHP code. Are you sure that paypal's link is working?

Posted: Sun Feb 16, 2003 8:05 am
by Jaymz
try to use rawurlencode instead urlencode

Hmmm.

Posted: Sun Feb 16, 2003 10:45 pm
by eggoz
Yes, I am sure that Paypal's links are working. It works on all products, except those with a / or () in the links. There appears to be no problems with " anymore. Anything inside the () don't show up in paypal. I thought the urlencode was suppose to fix this? Grrr. Fustrating.

Dumb Mistake.

Posted: Sun Feb 16, 2003 11:04 pm
by eggoz
Dumb Mistake... the () do work. Forgot to change to urlencode. So it's just down to the /. Any ideas?