Newbie needs help with redirect issue.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dtruett
Forum Newbie
Posts: 2
Joined: Thu Jul 29, 2004 11:21 pm

Newbie needs help with redirect issue.

Post by dtruett »

Hello,

We purchased a safelist hosting script (php) and have installed it with everything working properly. The script is written to utilize Paypal and Stormpay as the only payment methods. We want to integrate our merchant account through 1ShoppingCart.com. Our problem is that we must specify the return URL within 1ShoppingCart and therefore we are not able to include the necessary variables. 1ShoppingCart has advised that we need to create a redirect to the page we need the values posted to OR post the variables to the thank you page.

We are total newbies and have very little php knowledge. Can anyone advise us how to go about this or if this is even what we need to do?


Thank you!
Charles & Susan Truett
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you may be able to store the variables in a session, once they come back to the site after paying, you can pull the session data.. Although this is, if they don't close their browser during the process..
dtruett
Forum Newbie
Posts: 2
Joined: Thu Jul 29, 2004 11:21 pm

Post by dtruett »

Hi Feyd,

Thank you for responding! We did some research earlier tonight and tried storing the variables in a session. Not sure if we did it correctly or exactly where on the page it's supposed to go, perhaps that was the problem.

Anyway, we received the following error when trying to login after we uploaded the file.

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/safelist/public_html/head.php:17) in /home/safelist/public_html/index.php line

Any idea where we went wrong?

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

Post by feyd »

you had some form of text output starting at line 17 of head.php.. Sessions send out a cookie, which is sent through the http response headers. If you rearranged the code such that any text output, html, white-space of any form is printed after the session_start call, it should be fine.
Post Reply