Profile and Account Management for Form Creator Form
This script is called profile-and-account-management.php
The Profile and Account Management for Form Creator Form script is one of a group of PHP scripts that handle both the administrative and end-user aspects of a general purpose HTML Form Creator that allows not just input boxes but multiple selection enabled select/option lists as well. In addition to the expectable editing scripts for both administrative and end-user functions, there's also a Search and Match script so that users can use the scripts to find other users with various individual or group commonalities, including proximity searches, i.e., find all the users within various distances. There are even private messaging scripts.
- HTML Form Creator
- Edit Options in HTML Form Creator Form
- Administrator Page for HTML Form Creator
End-User HTML Form Creator Scripts
- HTML Form Creator—Register with Captcha
- HTML Form Creator—View Profile
- HTML Form Creator—Edit Profile
- HTML Form Creator—Search and Match
- HTML Form Creator—Search and Match — Security
- HTML Form Creator—Search and Match — JavaScript
- HTML Form Creator—Search and Match — Form
- HTML Form Creator—Search and Match — PHP
- HTML Form Creator—Enter Record in Form
- HTML Form Creator—View Record in Form
- HTML Form Creator—Profile and Account Management
- HTML Form Creator—Login to Profile and Account Management
- HTML Form Creator—Logout of Profile and Account Management
- HTML Form Creator—Delete Group Account
- HTML Form Creator—Forgot User Name
- HTML Form Creator—Forgot Password
- HTML Form Creator—Form to Send Private Message
- HTML Form Creator—Send Private Message
- HTML Form Creator—Private Message Outbox
- HTML Form Creator—Private Message Inbox
- HTML Form Creator—Delete Private Message from Inbox
- HTML Form Creator—Delete Private Message from Outbox
- HTML Form Creator—Private Message Logout
- HTML Form Creator—Search and Match Session Monitoring
- HTML Form Creator—Configure File for Database Connection
- HTML Form Creator—Captcha Script for Registration and Login
Administrative HTML Form Creator Scripts
First, we start up a session (in the checkid_.php script) and include the config.php script to ensure that our connection to our database is made correctly. This file has the codes below in it:
$theemailaddress = "yoursite@yoursite.com"; //EDIT ME
$roothostname = "localhost";
$theusername = "yourusername"; //EDIT ME
$thepassword = "yourpassword"; //EDIT ME
$thedatabasename = "yourdb"; //EDIT ME
mysql_connect("".$roothostname."","".$theusername."","".$thepassword."") or die(mysql_error());
mysql_select_db("".$thedatabasename."") or die(mysql_error());
We also 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 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.
The purpose of this script is to be the central menu that leads to all the other CMS HTML form creator scripts. These are the ones that users of the created forms use. The Administrator Page for HTML Form Creator script, administrator-page.php, is the central menu that leads to all the other scripts that the form creator—the administrator—uses. He does not use the HTML Form Creator—Profile and Account Management, page, profile-and-account-management.php, and the users do not use the Administrator Page for HTML Form Creator script. The private message scripts also have their own menus in their sidebars.
The script below is called: profile-and-account-management.php
<?php
include_once"checkid_.php";
$U=$_SESSION['username'];
define('_NODIRECTACCESS', TRUE);
include_once"includes/config.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_.php";</script>';}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>Profile and Account Management</TITLE>
<meta name="description" content="Profile and Account Management">
<meta name="keywords" content="Profile and Account Management,edit info,match,search,Register,php,javascript, dhtml, DHTML">
<style type="text/css">
BODY {margin-left:0; margin-right:0; margin-top:0;text-align:left}
p, li {font:13px Verdana; color:black;text-align:left}
h1 {font:bold 28px Verdana; color:black;text-align:center}
h2 {font:bold 24px Verdana;text-align:center}
h3 {font:bold 15px Verdana;}
#links {position:absolute;font-size:18px;top:100px;left:50%;margin-left:-150px;width:300px;padding:0px 20px 20px 20px;border:2px solid black;background-color:#ddd;}
</style>
</head>
<body>
<center><h1>Profile and Account Management</h1></center>
<div id='links'><BR>
<a HREF="login_.php">Login</a><BR>
<a HREF="message-logout_.php">Logout</a><BR>
<a HREF="register-with-captcha_.php">Register</a><BR>
<a HREF="match_.php">Search and Match</a><BR>
<a HREF="view-profile_.php">View Profile</a><BR>
<a HREF="edit-profile_.php">Edit Profile</a><BR>
<a HREF="delete-account_.php">Delete Account</a><BR>
<a HREF="enter-record-in-html-form-creator-form.php">Take or Retake Questionnaire</a><BR>
<a HREF="view-record-in-html-form-creator-form.php">View Questionnaire Record</a><BR>
<a HREF="send-message-form_.php">Private Messages</a><BR>
<a HREF="message-inbox_.php">Message Inbox</a><BR>
<a HREF="message-outbox_.php">Message Outbox</a><BR>
<a HREF="message-delete-received_.php">Delete Inbox Message</a><BR>
<a HREF="message-delete-sent_.php">Delete Outbox Message</a><BR>
<a HREF="message-logout_.php">Message Logout</a><BR>
<a href='forgot-password_.php'>I forgot my password</a><BR>
<a HREF='forgot-user-name_.php'>I forgot my user name</a><BR>
<a HREF="http://www.css-resources.com/">Home</a><BR>
<a href="http://www.css-resources.com/contact.html">Contact us</a><BR>
</div>
</body>
</html>