PHP and Paypal Shopping Cart

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
suz_1234
Forum Newbie
Posts: 24
Joined: Sat Sep 04, 2004 11:22 pm

PHP and Paypal Shopping Cart

Post by suz_1234 »

Hello,

I am trying to integrate Paypal shopping cart into my php based website...

Here is my shopping cart code..

Code: Select all

<input type="hidden" name="item_name" value= <?php echo $row&#1111;'bookName']; ?>>

<input type="hidden" name="item_number" value=<?php echo $row&#1111;'bookID']; ?>>
This code works partially. When I click on Add To Cart, the item is added into the shopping cart, but it does not print the bookName quite right..
So, for example,

If the book name is: PHP and Paypal Shopping Cart
It will only print 'PHP' in the Shopping cart... how would I make it print the full title of the item.

Thanks,
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

quote the value string in the html.
suz_1234
Forum Newbie
Posts: 24
Joined: Sat Sep 04, 2004 11:22 pm

Post by suz_1234 »

Quotes does not work...

Any other suggestions???
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

<input type="hidden" name="item_name" value="<?php echo $row&#1111;'bookName']; ?>">
that doesn't work?
suz_1234
Forum Newbie
Posts: 24
Joined: Sat Sep 04, 2004 11:22 pm

Post by suz_1234 »

Thats right, it doesn't work...

If I put quotes, it goes the Shopping cart but and prints 'Please enter an amount greater than zero.' in bold red

Another thing I found out was, when I look at the Source.. It shows me the Shopping cart values, just like I want (with the whole title)..

You may take a look at the site:

http://www.shalemdistributors.com/listBooks.php

Try clicking on the Add To Cart button... This is the modified version w/ quotes

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

<input type="hidden" name="bookName" value= Overcomming Spiritual Barriers in Japan>
that's not quoted.

copy the line I wrote exactly, and try again.
Post Reply