Home      Products & Services      Contact Us      Links

WebHatchers will design & develop your site for you.

Website Menu Heaven: menus, buttons, etc.

Send us your questions.

site search by freefind

SEO, Google, Privacy
   and Anonymity
Browser Insanity
Popups and Tooltips
Free Website Search
HTML Form Creator
Buttons and Menus
Image Uploading
Website Poll
IM and Texting
   or Not MySQL
Personal Status Boards
Content Management
Article Content
   Management Systems
Website Directory
   CMS Systems
Photo Gallery CMS
Forum CMS
Blog CMS
Customer Records
   Management CMS
Address Book CMS
Private Messaging CMS
Chat Room CMS
JavaScript Charts
   and Graphs

Free Personal Status Boards (PSB™)

Free Standard Free PSB

Free PSB Pro Version

Free Social PSB

Free Social PSB Plus (with Email)

Free Business PSB

Free Business PSB Plus (with Email)

PSB demo

Social PSB demo

Business PSB demo

So what's all this PSB stuff about?

Chart comparing business status boards

PSB hosting diagram

PSB Licence Agreement

Copyright © 2002 -
MCS Investments, Inc. sitemap

PSBs, social networking, social evolution, microcommunities, personal status boards
PSBs, social networking, business personal status boards
website design, ecommerce solutions
website menus, buttons, image rotators
Ez-Architect, home design software
the magic carpet and the cement wall, children's adventure book
the squirrel valley railroad, model railroad videos, model train dvds
the deep rock railroad, model railroad videos, model train dvds

Customer Form — We Manually Search for Your Key If You Lost Your Key During the Week You Ordered PHP Script

The scripts in the two link groups below are Customer Apps for Dealing with Product Keys and Email Addresses, and Administrator Apps for Dealing with Customer Records.

In our ecommerce world, products are sold by many different methods. Amongst these are getting out demos in various ways and when people try them, some of them are very pleased and they buy what's called a key. This unlocks the full feature set of the product when they enter it. There is a need to give the product users limited access to perform a few functions such as changing their emails, retrieving their keys from our database when they misplace them, etc. There is also a need for administrative functions to manage customer records. One needs to sort them, edit them, delete them, add them, view them, search them, register to be an administrator, login as administrator, etc.

If an ecommerce company does not have any of the applications below, it is forced to perform them the 20th century ways—by hand. This means paying for people to answer phones, write emails, keep paper files of customers, etc. The 21st century way is to let software perform these tasks, let websites and videos explain the product features, and let ecommerce close the sale and send the product.

Feel free to use these free Customer Records Management scripts in your business. Note: we know they work well for us (they are well tested), but we assume no liability for how they work in your situation. Similarly, we added lots of security measures such as extensive input filtering, but we make no claims and assume no liability for how securely they work in your situation.

The best security measure to take when using the administrative part of a system like this (meaning the Administrator Apps for Dealing with Customer Records, not the Customer Apps for Dealing with Product Keys and Email Addresses in which category the script below resides) is do not have any links ANYWHERE that link to the URLs of any of the admin files on the server, so neither hackers nor Google finds them. Then use the admin CMS yourself but do not even let your momma use it. Don't even save the link to the admin login as a Favorite, just to be secure. Just stick the login username and password in Roboform and make them impossible to guess. Then use Roboform to logon. The script below, and the other Customer Apps, are included online and linked to as part of the product web pages that make life easier for everyone. Their security is mainly handled via extreme input filtering. The Admin Apps are hidden, unlinked to, and well protected with security measures, password hashes and salts, etc.

This script is called lost-their-key-before-Monday.php

Customer Apps for Dealing with Product Keys and Email Addresses

Administrator Apps for Dealing with Customer Records

The form action in Customer Form — We Manually Search for Your Key If You Lost Your Key During the Week You Ordered is the script on this page: lost-their-key-before-Monday.php. That script processes the data which the user enters in the form on the form page. Note that in order to get a product key emailed to them, the users must enter not only the email address, but also their other data. The PHP script below will filter the data that gets entered. The "before Monday" stuff is because we enter into the MySQL db new user data like keys every Monday from accumulated orders over the week. You may do it daily if you wish. But if you do it less than weekly, users that use the various user forms about getting keys or changing email addresses will have problems and will create difficulties for the administrator.

If a user is not sure of the email address that was used when the product key was purchased, the user may try several emails, separated by commas.

First we define a regular expression pattern:
$pattern1 = '/[^A-Za-z0-9 \\-\\.\\@\\_\\,]/'. This will allow the legitimate characters found in the various types of data and ensure there are no nasties in input. The replacement string ensures that all bad characters are dumped. Good data MUST be found in order to get a product key emailed to them.

The data that has been entered is POSTed to this PHP script from the form. Next the strip_tags() function knocks out tags in data. Then the preg_replace() function uses the pattern to ensure the POSTed data is filtered.

Then we get to the emails—which may be a comma-separated list. We use the strpos() function to check their email input for commas—it finds the position of the first one or returns false. If there are any, the email input is a comma-separated list of email addresses, in which case we use the substr() function to grab just the first in the list, since that is supposed to be their current email, since in the form, they saw: MAKE SURE THE FIRST ONE IS YOUR CURRENT EMAIL ADDRESS, which was refering to emails. The grabbed one becomes the "From" in the email which is now sent to the company administrator to process, making it the "To" when the administrator does a Reply.

We send the email using the standard form of email sending. You'll want to change words like yoursite.com, and the link to index.html later to the words that apply in your situation. The user is told: "Message sent!" and sent to index.html, so you'll want that to be a real web page or you'll want to tweak it.

This script is called lost-their-key-before-Monday.php

//We Manually Search for Their Key (lost-their-key-before-Monday.php)

$pattern1 = '/[^A-Za-z0-9 \\-\\.\\@\\_\\,]/';
$replacement = '';
$F=preg_replace($pattern1, $replacement, $F);
$L=preg_replace($pattern1, $replacement, $L);
$B=preg_replace($pattern1, $replacement, $B);
$E=preg_replace($pattern1, $replacement, $E);
$P=preg_replace($pattern1, $replacement, $P);
$S=preg_replace($pattern1, $replacement, $S);
$C=preg_replace($pattern1, $replacement, $C);
$STATE=preg_replace($pattern1, $replacement, $STATE);
$Z=preg_replace($pattern1, $replacement, $Z);
$O=preg_replace($pattern1, $replacement, $O);
$D=preg_replace($pattern1, $replacement, $D);
$a= strpos($E,",");
if ($a === false) {$email=$E;}else{$email=substr($E,0,$a);}
$to = "you@yoursite.com";
$subject = "Request for key: (lost their key before Monday)";
$message = $F." ".$L."\n".$B."\n".$E."\n".$P."\n".$S."\n".$C." ".$STATE." ".$Z."\n".$O."\n".$D;
$headers = "From: ".$email;
$mail_sent = mail($to, $subject, $message, $headers);

if($mail_sent){echo '<SCRIPT LANGUAGE="JavaScript">alert("Message sent!");</script>';}
echo '<SCRIPT LANGUAGE="JavaScript">window.location = "index.html";</script>';