Skip to main content
Inspiring
February 24, 2007
Question

$_REQUEST / $_SESSION

  • February 24, 2007
  • 1 reply
  • 343 views
Hope someone can help with this, as I'm from a design rather than coding background.

Basically I've just about finished off integrating an ecommerce site with Protx, whereby some customer data is collected on the main site (contact info mainly) before being passed to protx's payment gateway.

In the first instance, the Protx script collects various fields, by way of $_REQUEST - eg :

$ThisVendorTxCode = $_REQUEST['VendorTxCode'];
$ThisAmount = $_REQUEST['Amount'];
$ThisCurrency = $_REQUEST['Currency'];
$ThisDescription = $_REQUEST['Description'];
$ThisCustomerEmail = $_REQUEST['CustomerEmaill'];

etc.

However, the customer is required to log in with an email address before ordering, so their email address is held in a session.

So what I thought was all I needed to do was replace another form text field 'CustomerEmail' in the form, and

$ThisDescription = $_REQUEST['CustomerEmail'];

on the following confirmation page, with just

$ThisCustomerEmail = $_SESSION['Email'];

on the confirmation page, and that from then on, it would be fed through just as the $_REQUEST['CustomerEmail']; would.

But it seems not.

Am I barking up the right tree here, or is there some fundamental reason why this isn't working?

Hope that makes sense!

Cheers.

This topic has been closed for replies.

1 reply

Inspiring
February 25, 2007
Have you got:

<?php session_start(); ?>

at the top of the page to enable sessions.


--
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.


Inspiring
February 25, 2007
I do - yes.

In the end, I looked at my pages that let a user edit and view their profile, and did what I did there - ie create a recordset, and pull in the email address from the record. Which achieves the same result.

Although I'm still not sure why the session variables themselves wouldn't display. They're there in the applications > bindings panel of DW OK, so I thought all I really had to do was drag and drop.....