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

PSB™ Status Update PHP Code for Multiple PSB™ Hosts

This PHP code updates the MySQL table containing the Personal Status Board (PSB™) statuses and comments for PSB™s, and, like other server-side scripts (PHP, CGI, ASP), can support many PSB™ users simultaneously. The code first grabs the ID, status, comment, and table name that was posted to it by the main PSB™ page, psb.php. It uses this data to do the updating of statuses and comments. The table name will contain the user name of the administrator. Users and administrators never see the file below—only the PSB™ host sees it, so he will have to replace the "yourusername", "yourpassword" and "yourdatabase" with legitimate names that will enable the MySQL connection to be made and the database to be chosen. Only one database will be used to host PSB™s, and each administrator's data will be entered into the host's "members" table (that contains the users password, and the administrator password and user name, email address, date of joining, and IP of administrator). Each administrator gets 2 other tables as well that are for his group only. The first contains his group's statuses and comments which any group member may change, and the second contains the current meanings of the 100 status codes—which only the administrator may change if his group wants it.

Note that the script submits itself back to psb.php as soon as the table is edited and a couple of field values get posted back to psb.php. The flag set to "1" means "returning from updating the PSB™" and the table name gets sent because even though the psb.php script just sent this value to this update script, the only way it will continue to have the correct table name is if we post it back with POST, send it as a cookie, send it with GET, or use session variables. By posting it back and forth, once a user signs in, his user name will not be subsequently forgotten, since it's now part of the table name. Note the need for JSON in json_encode($table) to convert the table name received in PHP to JavaScript so it could be stuck in the form's hidden field value for posting. There's no other convenient way to do this conversion, although there is a cheap and dirty way to pull off this string conversion.




// Make a MySQL Connection
mysql_connect("localhost", "yourusername", "yourpassword") or die(mysql_error());
mysql_select_db("yourdatabase") or die(mysql_error());

// Update record where id = $ID in their table in db yourdatabase
$query="UPDATE $table SET Status='$status', Comment='$comment' WHERE ID='$ID'";

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

echo "Record Updated";



<form name="MyForm" method="POST" action="psb.php">
<input type="hidden" name="flag" value="1">
<input type="hidden" name="table" value=" ">


<script language="javascript">
var tbl = <?php echo json_encode($table); ?>;