You are here: Need Help Passing Session ID Between Domains (Revisited) « All PHP « IT news, forums, messages
Need Help Passing Session ID Between Domains (Revisited)

Posted by Dano on 08/22/06 23:15

I have a domain - http://www.idcardfactory.com - that shows a host of
products. A user can add items to a shopping cart, then when he wants
to checkout and order the products in the shopping cart, I take him to
https://secure.idcardfactory.com/checkout.php?phpsessionid=$PHPSESSID.
I
pass the session id variable in the URL, and it's SUPPOSED to recreate
the session variables in the new URL.

I use the same code on other sites, and it seems to work fine. But on
this one, it doesn't hold the session ID, and we lose all the
user-entered data, (name, shipping address, etc.)

Any suggestions as to what I'm missing? Like I said, it's virtually the
same code I use on other sites, but it isn't working now in this
instance.

Thanks in advance for your help!

Dan Ford

A reply suggested I post my code, so here it is:

-----BEGIN CODE-----
>From "terms.php," (path: http://www.idcardfactory.com/terms.php, BUT
the actual physical path on the server is /public_html/terms.php):
<?
session_start();
?>
<!-- skip HTML -->
<form method="POST" name="OrderNow"
action="https://secure.idcardfactory.com/checkout.php?session_id=<?
echo $PHPSESSID; ?>">
<input type="submit" value="I accept!" name="OrderNow">
</form>

>From "checkout.php" (path:
https://secure.idcardfactory.com/checkout.php, BUT the actual physical
path on the server is /public_html/secure/checkout.php):
<?
session_start();
?>
<!-- skip HTML -->
<?
//order_id is a session variable that SHOULD carry over
include("connection.php");
$query = "SELECT * from new_orders where order_id = '".$order_id."'";
//extraneous PHP code deleted
?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация