Jump to content

set a session track from an email link then when form submitted to pick up sessi


jarv

Recommended Posts

hi,

 

I have a website with  many htm pages and a contact page with a sendform.php

I also have an emailer link

 

 

I have tracking scripts in my pages and they are being tracked

 

the following link is tracked and counts how many times the form is submitted in the campaign MM02574 when they click submit the form from the email link

This is also doing the same for users who just browse the site and do not come in from the email

 

thankyou.htm?source=Emailer1&campaignname1=MMO2574&contact=contact

 

I want to do something like this:

 

IF User comes from email THEN

  header( "Location: thankyou.htm?source=Emailer1&campaignname1=MMO2574&contact=contact" );

ELSE IF the user doesn't come from the email THEN

  header( "Location: thankyou.htm" );

END IF

 

ok, i am now using the following code it is not redirecting to thankyou page just goe sto a blank page with no errors?!:

 

new homepage:

<?php
    // this starts the session
    session_start();

    // this sets variables in the session
    $_SESSION['email']='true';
    ?>

 

when user submits the form:

IF $_SESSION['email']='true'{
header( "Location: thankyou.htm?source=Emailer1&campaignname1=MMO2574&contact=contact" );
} else {
header( "Location: thankyou.htm?contact=contact" );
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.