R
E
S
O
U
R
C
E
S
       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
_______________________

HOME
SEO, Google, Privacy
   and Anonymity
Browser Insanity
JavaScript
Popups and Tooltips
Free Website Search
HTML Form Creator
Animation
Buttons and Menus
Counters
Captchas
Image Uploading
CSS and HTML
PHP
AJAX
XPATH
Website Poll
IM and Texting
Databases—MySQL
   or Not MySQL
Personal Status Boards
Content Management
   Systems
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

Info for The Standard Personal Status Board (PSB™)

Standard PSB™ users will not register—they will simply "create" (simply name it) a MySQL database (free), enter a user and password and permissions (all), use phpMyAdmin on the server control panel to enter data, and upload the files downloadable from us. To use the Standard PSB™, go to http://yoursite.com/PSB/test-db-WORKS-GOOD.php or http://yoursite.com/test-db-WORKS-GOOD.php depending on whether you put the 6 files we send you in a folder or not. Once you get to this page, login and type your status and comment into the PSB™ and click the "Update PSB" button. This changes the PSB™ table in the database. Any other member of this PSB™ can log in and see this new status and comment as well as everyone else's, and they too will be able to change statuses and comments. There are 100 different status codes to use, and there's a chart of all the status codes and their meanings right after the status/comments display table. It looks like this.

If you have the PSB™ Standard version and you decide you wish to host multiple PSB™s (or at least get administration programs for editing from the Web rather than from a host's control panel), and you need PSB, registration, and administration files, we can help. You will need to get our PSB™ Pro version which will have a file called convert-standard-psb-to-pro-psb.php that will help you update any MySQL tables from the PSB™ Standard version. Contact us for details.

PSB™ Terms of Use

(See a demo of the PSB™ here on our PSB™ demo page.) You may copy the files and use the PSB™ yourself for your family, group, MC, local group of families, babysitting co-op, or whatever—any legal, legitimate group that is not about violence or hate or crime or treason or porn may use our PSB™ software. This site and the files we let you copy are all copyrighted material and you may NEVER sell any of them in any way (except if you paid us for them by buying a PSB™, in which case you may sell them as long as you delete all these files from all computers, servers, or any other storage device that you put them on). You may not change or omit the words PSB™ or Personal Status Board anywhere on your site or in the code or metatags. The Personal Status Board (PSB™) is our name for this software, which was invented as a concept by M.C. Smith in 1988, and created as an electronic device in 1988 as well, although software on the Internet is a more viable form, now. There just wasn't much of an Internet in 1988! Anyway, MCs are our name for microcommunities, although you're free to use the term however you like (but we'd prefer people use it in the sense presented on this website). PSB™s, however, are intellectual property and software copyrighted and trademarked by no one except MCS Investments, Inc., and any use of these materials not complying with the above terms will result in legal action. So please honor the above terms of use—it's really not too much to ask!

Standard PSB™ Details

Here, then, are the names of the files needed to use this cutting edge tool of social evolution:

Just extract the psb.zip file files cited above to a folder and make the edits cited on this page, and upload these files.


Standard Version

or

Pro Version

Here's a printout of the entire update.php file. There isn't that much to it. It's easy to see what you need to change, but we go through it with you, below, pointing out the specific changes to make so the file represents YOUR database, table, passwords, and user names:

<html>
<head>
<style type="text/css">
BODY {background-color:#88f;}
</style>
</head>
<body>

<?php

$ID=$_POST['ID'];
$status=$_POST['status'];
$comment=$_POST['comment'];
$ttt=$_POST['ttt'];

mysql_connect("localhost", "your_username", "your_password") or die(mysql_error());
mysql_select_db("your_database") or die(mysql_error());

$comment = strip_tags($comment);
$pattern =
'/[^a-zA-Z0-9\\s\\.\\,\\!\\;\\-\\_\\"\\?\\047\\:\\(\\)\\/]/i';
$comment=preg_replace($pattern, "", $comment);
$comment=mysql_real_escape_string($comment);
$comment=$comment."|".$ttt;

$query="UPDATE your_db_table SET Status='$status', Comment='$comment' WHERE ID='$ID'";

mysql_query($query) or die ("Trouble updating database");

mysql_close();

?>

<form name="MyForm" method="POST" action="test-db-WORKS-GOOD.php">
<input type="hidden" name="flag" value="1">
</form>

<script language="javascript">
document.MyForm.submit();
</script>

</body>
</html>

In order to use the update.php file, you need to change "your_username", "your_password", "your_database", and "your_db_table" into correct values ("localhost" can usually be left as it is without changing it) and resave the update.php file. Then fix the password code in test-db-WORKS-GOOD.php:

$o = array("your_user_name1+your_password1","your_user_name2+your_password2",
"your_user_name3+your_password3","your_user_name4+your_password4",
"your_user_name5+your_password5","your_user_name6+your_password6",
"your_user_name7+your_password7","your_user_name8+your_password8",
"your_user_name9+your_password9","your_user_name10+your_password10",
"your_user_name11+your_password11","your_user_name12+your_password12");


—so it has the correct username/password pairs separated by plus signs. If each person has their own password and user name, you may add as many more username/password pairs as you like, or reduce them down to one that everyone can use. And then, also in test-db-WORKS-GOOD.php, change these lines to represent your particular values:

// Make a MySQL Connection
mysql_connect("localhost", "your_user_name", "your_password") or die(mysql_error());
mysql_select_db("name_of_db") or die(mysql_error());

// Retrieve all the data from the "name_of_db_table" table as a MySQL Resource
$result = mysql_query("SELECT * FROM name_of_db_table") or die(mysql_error());

And then, also in test-db-WORKS-GOOD.php, change the name_of_db_table value in the following to your value, then resave the file:

$myArray=array();

$res = mysql_query("SELECT Firstname FROM name_of_db_table") or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
array_push ($myArray, $row[0]);
}

$myArray2=array();

$res = mysql_query("SELECT Status FROM name_of_db_table") or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
array_push ($myArray2, $row[0]);
}


In order to use these files, you also need to have a website and get a MySQL database installed for you by the host and make sure your host server has PHP 5.2 or higher (PHP added a JavaScript Object Notation—JSON—extension to PHP V5.2, which was previously only available as add-on, and it is enabled by default in PHP, but if your host has it disabled, have him enable it). Most hosting plans include MySQL databases and JSON-enabled PHP 5.2 or better anyway, so you just need to access the cPanel X control panel, go to the utility called MySQL Databases, give your MySQL database a name, enter all your members' user names and passwords, select maximum permissions for each user name, save them, then—lower down the page—add these users to your newly named MySQL database. Then use the phpMyAdmin utility and access the MySQL database you named, create a table in it, insert data in the table, and save this as well. The phpMyAdmin utility should be in the Databases section of the control panel. It allows easy, intuitive access to enter and edit tables in your database.

Of course, after startup, editing of status and comment data is done through PSB™ interfacing by members. We suggest guidance from this site and/or this site for using phpMyAdmin and entering tables in your MySQL database—it's easy and requires no programming at all. Just follow the simple tutorials. For security's sake, make sure passwords use some special characters like $#@!*^&% as well as letters and numbers. In use, once people are logged in (by going to http://yoursite/psb/test-db-WORKS-GOOD.php), they can update statuses and comments as much as they wish. We can't say if your host logs people out after a long period of inactivity—ours hasn't so far. At worst you then log back in. This can be made quicker and easier with RoboForm. It's free!

When you enter data, you need to set up 4 fields.

The first field should be named Firstname, it should be of the type "varchar", and it should have a maximum character allotment of 12.

The second field should be named ID and it should be set to be the PRIMARY field, it should be of the type "int", and it should have a maximum space allotment of 2. When entering ID data, the first record MUST have a 1 for its ID, the second a 2, etc. IMPORTANT! It is critical that these ID numbers are sequential, that they begin with 1, and that there are no gaps or the PSB™ won't work right!!!!! So if you dump a member, renumber all IDs from him to the end so NO number is skipped. And if you add a member, add him at the end as the last record and give him the next sequential number after the last member ID. (The Pro version has no special rules like this, and needs no editing in the control panel. Nor do the Business PSB™ or Social PSB™.)

The third field should be named Status, it should be of the type "char", and it should have a maximum character allotment of 2, and no less than 2 characters should ever be entered. Enter any old numbers for now—members will change them once your PSB™ is live.

The fourth field should be named Comment, it should be of the type "varchar", and it should have a maximum character allotment of 60. You needn't enter comments in the database—you can wait for members to do it in the PSB™.

PHP Code (optional—in case you want to know how we built the PSB™)

We needed to do this PSB™ project and it required PHP. JavaScript lives on the browser and cannot address, create, display, or edit databases that live on servers. You cannot talk to MySQL unless the db interface is done with ASP or PHP. PHP lives on the server and it can address, create, display, or edit databases that live on its server. In practice, it is very convenient to create an HTML page with JavaScript routines for the browser action and, on the same page, PHP for the server action. All these languages on the same page requires that you give the page a .php extension. When you load a PHP website on the browser, the PHP stuff all happens on the server, then the browser loads the page, but doesn't load the PHP code, but rather it loads the RESULTS of the server's PHP actions. So you don't have to worry about people looking at your source code with View Source. Not only will the source leave out all PHP codes, it will also fail to display the HTML or Javascript that happens to be between PHP tags (<?php and ?>). In the case of our test-db-WORKS-GOOD.php page, that's most of the page, even though it's almost all HTML and JavaScript!

Now to look at the above code:

<html>
<head>
<style type="text/css">
BODY {background-color:#88f;}
</style>
</head>
<body>

<?php

$ID=$_POST['ID'];
$status=$_POST['status'];
$comment=$_POST['comment'];
$ttt=$_POST['ttt'];

As the name implies, the purpose of the update.php page is to update the PSB™ website page (test-db-WORKS-GOOD.php) with new data once it's entered and the "Update PSB™" button is clicked. In this update.php file (listed above), we do the HTML preliminaries, declare PHP, then grab the record number (id) and data in a specific record which the main page, test-db-WORKS-GOOD.php, will be "POST"ing to it once the user enters the data. (The local date and time is also there and ends up in the $ttt variable.) To reitterate, the whole purpose of this PHP page is to update the db once a user types in new entries on the form in the test-db-WORKS-GOOD.php page. The name of the form input fields are 'ID', 'status', and 'comment', and there is a hidden field in that form that gets the time, ttt, inserted into it. Whatever values are in these inputs when the "Update PSB™" button is pressed will be sent to this update.php page because the form action tells it to, via action="update.php". So now that we know what data goes in what record, we update the MySQL db record like so:

mysql_connect("localhost", "your_username", "your_password") or die(mysql_error());
mysql_select_db("your_database") or die(mysql_error());

$comment = strip_tags($comment);
$pattern =
'/[^a-zA-Z0-9\\s\\.\\,\\!\\;\\-\\_\\"\\?\\047\\:\\(\\)\\/]/i';
$comment=preg_replace($pattern, "", $comment);
$comment=mysql_real_escape_string($comment);
$comment=$comment."|".$ttt;

$query="UPDATE your_db_table SET Status='$status', Comment='$comment' WHERE ID='$ID'";

mysql_query($query) or die ("Trouble updating database");

mysql_close();

?>

We connect up with the db with special mysql commands. Note that we hard-wired in a user name and password so the process could happen without login, which will have already occurred on the main page, test-db-WORKS-GOOD.php. This is cool because there's no way to see this PHP code—it's on the server but NOT on the browser. Feel free to use the more standard way, a db configure file at the start of each PHP page as an include.

Next we use some security techniques. The first is to get out any potentially malevolent HTML tags with strip_tags(). Next we define a regular expressions pattern with acceptable characters. Then we use the PHP preg_replace() function to dump eveything except those characters. The 047 is single quote, which we've already used to surround the replacement pattern, so ' would not work. Next we use the trustworthy mysql_real_escape_string() function to escape all problematical characters, which you should always do before inserting data into a MySQL db table. Then we append the date-and-time variable to the end of the $comment variable, with | for a separator, which we will need back in the test-db-WORKS-GOOD.php page when we address the db table and display its data.

We used the UPDATE command which uses WHERE and is saying when the id in the db table is the ID we POSTed to this page, we update that record only, since no others have that id number. Now it's time to get cute:

<form name="MyForm" method="POST" action="test-db-WORKS-GOOD.php">
<input type="hidden" name="flag" value="1">
</form>

<script language="javascript">
document.MyForm.submit();
</script>

</body>
</html>


We create a form whose action is to send us back to the test-db-WORKS-GOOD.php page from whence we came, but this form, as you can see, has no Submit button but merely a hidden field with a value to send, which is merely a flag that means our update was done. Finally, we use JavaScript to submit the form to test-db-WORKS-GOOD.php with that flag value. The cool thing about not having a Submit button is that this whole page is totally automatic and it loads, updates, and leaves in under a second—which is experienced as a quick page reload in our main page, test-db-WORKS-GOOD.php. If you blink, you miss it.

Need more? Explanations of the entire main PSB™ page are here: More PHP Info

Changing Status Meanings and/or Demo Arrays

We gave 2 links to tutorials on the simple task of db setup, above. But what if you decide you want to change the meaning of code 98 from "Writing a letter" to "Doing my homework," or "Working at my job"? Or whatever. Simply load psb.js into a text editor, find "Writing a letter" second from the end, change it, and resave the file. Now it will display as the changed value for everyone in your group. (To edit, load it into your text processor (NotePad or Editor2) by right-clicking the file name in your file manager and choose Open With . . .) We suggest getting your group's permission before changing array values. With the demo, you'll need to change arrays in psb-demo.js as well:

var IDs = new Array(1,2,3,4,5,6,7,8,9,10,11,12);

var memstatus=new Array('01','02','23','45','04','03','73','97','13','11','07','66');

var fname=new Array('Fred','Shirley','Barbara','John','Sue','Ferdinand','Sean','Doris','Bob',
'Georgia','Joe','Harriet');

var comments=new Array('I;m in a good mood.','with edna','Come on in.','I;m feeling creative!','zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz','Don;t knock!','Hey, I;d like to go down 5 to Portland.','Wheeeeeeeeeeeeeeeeeeee!!!!!!!!!','I prefer cool kids!','even soon','whatever','Poor me!');


Note that there are 12 members. To add 3 more, just append ,13,14,15 to the IDs array, 3 more status codes to the memstatus array, 3 more names to the fname array, and 3 more comments to the comments array. Be careful about syntax—don't forget any apostrophes or commas (but do not use apostrophes in comments for possessive case or contractions—use semicolons instead!). Replace our data with yours, as long as status codes are 2 digits and ids are consecutive digits that start with 1.