oavs Posted January 28, 2008 Share Posted January 28, 2008 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: [email protected] You have seen your logo: < number of times > --------------------------------------------- ---------- CODE --------------------- <? $to = "[email protected]"; $headers = "From: ABC - Visual Concepts <[email protected]>" . "\r\n" . "Subject: Your Login Details for your Art Work" . "Reply-To: [email protected]" . "\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 https://forums.phpfreaks.com/topic/88122-how-to-count-how-many-times-viewed-after-login/ Share on other sites More sharing options...
nethnet Posted January 28, 2008 Share Posted January 28, 2008 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. Link to comment https://forums.phpfreaks.com/topic/88122-how-to-count-how-many-times-viewed-after-login/#findComment-450927 Share on other sites More sharing options...
cooldude832 Posted January 28, 2008 Share Posted January 28, 2008 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 https://forums.phpfreaks.com/topic/88122-how-to-count-how-many-times-viewed-after-login/#findComment-450934 Share on other sites More sharing options...
oavs Posted January 28, 2008 Author Share Posted January 28, 2008 Ok Ok I am convinced thank you and thank you . Any ideas how may I do this since have no clue. Can you see my code above and tell me how I could use it please Thank you in advance Link to comment https://forums.phpfreaks.com/topic/88122-how-to-count-how-many-times-viewed-after-login/#findComment-451736 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.