• 0

PHP ISSUE


Question

I have the following contribution for OSCommerce:

Update the Customers table

ALTER table customers add customers_advertiser varchar(30);
ALTER table customers add customers_referer_url varchar(255);

Add the following
// ad tracking
  if (!$advertiser) {
      $advertiser = $_GET["ad"];       
      tep_session_register('advertiser'); 
   }
   
   if (!$referer_url) {
    $referer_url = $HTTP_SERVER_VARS['HTTP_REFERER'];
    tep_session_register('referer_url');
  }

Change THIS (around line 250):

$sql_data_array = array('customers_firstname' => $firstname,
                            'customers_lastname' => $lastname,
                            'customers_email_address' => $email_address,
                            'customers_telephone' => $telephone,
                            'customers_fax' => $fax,
                            'customers_newsletter' => $newsletter,
                            'customers_password' => crypt_password($password),
                            'customers_default_address_id' =>;
     	 
To THIS:

$sql_data_array = array('customers_firstname' => $firstname,
                            'customers_lastname' => $lastname,
                            'customers_email_address' => $email_address,
                            'customers_telephone' => $telephone,
                            'customers_fax' => $fax,
                            'customers_newsletter' => $newsletter,
                            'customers_password' => crypt_password($password),
                            'customers_default_address_id' => 1,
     	 'customers_advertiser' => $advertiser,
                            'customers_referer_url' => $referer_url);

The first is for SQL, the second is the code to get the referral url and the third adds the referral url to the sql database. There is also some code for an "Advertiser" but I am not using that at this time, in order to use that I have to add text to the end of the links I post.

The problem is when someone visits my site via a bookmark or types in the address manually they get the following error: Error! Unable To Determine The Page Link!

Any help would be greatly appreciated.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.