views:

21

answers:

1

Here I am again. I hate to be a bother but here's another zinger.

I have a custom made shopping cart and have some dynamic links in the page that when served up in a browser will replace $name with the product name and $p with the procuct id number. I'm aiming for a link on the page like this: http://www.something.com/buy/ProductName/382793/

What I'm getting is http://www.something.com/buy/ProductName/0/382793 and no trailing slash. Gotta have the slash.

The code looks like this: <a title=\"View Product.\" href=\"http://www.something.com/buy/$name/$p/". $line["PID"]. "\">PRODUCT LINKO</a>

You can see that I have $name and $p separated by a slash and a trailing slash at the end but it's not working. Any ideas ladies and gentlemen?

+2  A: 

The "tailing" slash at the end is escaping the double quote:

<a title=\"View Product.\" href=\"http://www.something.com/buy/$name/$p/". $line["PID"]. "/\">PRODUCT LINKO</a>

Should add the tailing slash as requested.

Brad F Jacobs
Well, how about that? Sometimes this stuff crosses my eyes.Thanks a heap!
Fisherman