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

Delete Group Account

This script is called delete-account.php

The first section is at the start of the script. First, we use the checkid.php script to ensure that the session id variable is set, and send the user to register-with-captcha.php if it is not. Then we put the session variable 'username' into $U—we will be checking that it is set in a second. Then we define a named constant '_NODIRECTACCESS'. We include the config.php file (in the includes folder) which uses the PHP defined() function to check on this constant. If it is not set, we are thrown out of the config.php file like yesterday's trash.

Next we check if the session variables 'groupname', 'username', and 'userid' are set. If not, we are sent to the login-to-mc.php script. We make sure $U is still equal to the session variable 'username', that it is not an empty string, and that it's at least 6 characters long or . . . you guessed it . . . the login script. We make sure the session id is set and send them away if not.

You cannot delete anything unless you are logged in and you submit the form, assuring the script that you do, indeed, wish to delete your account. You will see "This will delete your account, [your username]." But you will also see a back-out link that says "Return to Account Management—do NOT delete anything!" Clicking this link brings you back to MC Search and Match Profile and Account Management.

The script below is called: delete-account.php

if (!isset($_SESSION['groupname']) || !isset($_SESSION['userid']) || !isset($_SESSION['username']) || $_SESSION['username']<>$U || !isset($U) || $U=="" || strlen($U)<6 || !isset($_SESSION['sessionid'])){echo '<script language="javascript">alert("Please login."); window.location = "login-to-mc.php";</script>';}

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>Delete MC Account</TITLE>
<meta name="description" content="Delete MC Account">
<meta name="keywords" content="Delete MC Account,mc,account,mc account,delete account,javascript, dhtml, DHTML">
<body bgcolor="green">



$sql="DELETE FROM mc_members WHERE username = '$U'";
$result=mysql_query($sql) or die('Error ,deleting failed');

$rc = mysql_affected_rows();
if ($rc>0){echo '<script language="javascript">alert("The account deleting was successfully accomplished.");window.location ="register-with-captcha.php"; </script>';}
else{echo '<script language="javascript">alert("Deleting failed.");window.location = "register-for-mc.php"; </script>';}


<div style='margin:100px 0 0 50px;'>
<form id="form1" name="form1" method="post" action="delete-account.php">
<table style='padding:20px;background-color:#eee' width="400" border="1" align="center" cellpadding="0" cellspacing="1">
<td><input type="hidden" name="username" value=" "><input type="hidden" name="answer" value="1"></td>
<td>This will delete your account, <? echo stripslashes($U); ?>.</td>
<td align=center><input type="submit" name="Submit" value="Submit"></td>
<td><a href="register-for-mc.php"><B>Return to Account Management—do NOT delete anything!</B></a></td>

<script type="text/javascript">

var u = <?php echo json_encode($U); ?>;