Jump to content

How to count how many times viewed after login


oavs

Recommended Posts

Hi

 

I have a form which directs the user to a login page with pre determined user/password section of the page. As they send the form I and the user gets an email with the details entered.

 

They get an email with following and would like to include a field saying "You have seen your logo: < #number of times >" in numerical numbers without using Mysql. database.  Basically I want to be able count each user individually for a say 14-30 days.

 

Can it be done?

I have included my code which sends the emails below, Is there anyway I can track by, phonenumber,or an email ?

 

Thank you in advance.

 

 

-------sample email response received ----------------

Hello rachelle,

 

Please use following login details to see your artwork.

First click on to the URL link below to go to the website then select LOGIN - Client Project Login from the navigation menu.

URL: http://www.abc.com.au

Username: admin

Password: enter

 

 

You have entered following details.

 

Name: rachelle weale,

Company: funk/hiphop dance classes

Phone: 0315245884

Email: fred@hotmail.com

You have seen your logo: < number of times >

---------------------------------------------

 

---------- CODE ---------------------

<?

$to = "abc@abc.com.au";

 

$headers = "From: ABC - Visual Concepts <support@abc.com.au>"  . "\r\n" .

  "Subject: Your Login Details for your Art Work" .

      "Reply-To: support@abc.com.au" . "\r\n" .

  "cc:$Email" . "\r\n" .

      "X-Mailer: PHP/" . phpversion();

 

 

//$subject = "Your Login Details for your Art Work"

 

$from_header = "Hello $Name,\n\n Please use following login details to see your artwork. \n First click on to the URL link below to go to the website then select LOGIN - Client Project Login from the navigation menu. \n URL: http://www.abc.com.au \n Username: admin\n Password: enter \n\n\n You have entered following details.\n\n Name: $Name $Surname,\n Company: $Company\n Phone: $Phone \n Email: $Email \n I Accept Terms and Conditions of viewing my logo commissioned to OAVS - Visual Concepts";

 

if($Name != "")

if($Surname != "")

if($Company != "")

if($Phone != "")

if($Email != "")

{

  //send mail - $subject & $contents come from surfer input

  // mail($to, $Company, $from_header, "Bcc: $Email" . $headers);

  mail($to, $subject, $from_header, $headers);

 

  // redirect back to url visitor came from

  //header("Location: $HTTP_REFERER");

  header("Location: select.php");

}

  else

{

  print("<HTML><BODY>Error, no comments were submitted!");

  print("</BODY></HTML>");

}

?>

 

 

 

Link to comment
Share on other sites

You could keep track of how many times the logo was viewed in a flat text file if you don't want to use a database.  Although, if this is sensitive material, you should be aware that the text file won't be secure.

 

Wrong!

 

Flat files are exactly what a mysql database is data in some organized fashion.  The fact that the physical mysql "file" is protected in a much more elaborate fashion than most text files make it seem to have a more sophisticated version of security, however flat file storage can be just as secure if not more secure than mysql storage when properly done.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.