View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Checkout page binding issue

Thread began 5/26/2009 8:18 am by geordie728 | Last modified 5/26/2009 5:17 pm by geordie728 | 1904 views | 15 replies


Sorry - where should die statement go?

Nothing of MM_UserGroup seems to work.

Here's the login page:

<?php require_once('Connections/connHCHQ.php'); ?>
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
return $theValue;
// *** Validate request to login to this site.
if (!isset($_SESSION)) {

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];

if (isset($_POST['emailAddress'])) {
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "checkout.php";
$MM_redirectLoginFailed = "customer_login.php?failed=true";
$MM_redirecttoReferrer = false;
mysql_select_db($database_connHCHQ, $connHCHQ);

$LoginRS__query=sprintf("SELECT UserEmail, Password1 FROM users WHERE UserEmail=%s AND Password1=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));

$LoginRS = mysql_query($LoginRS__query, $connHCHQ) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";

//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;

if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
header("Location: " . $MM_redirectLoginSuccess );
else {
header("Location: ". $MM_redirectLoginFailed );

and it's form:

<form action="<?php echo $loginFormAction; ?>" method="POST" name="customerLogin" class="user">
<p><label>Email address:</label><input name="emailAddress" type="text" /></p>
<p><label>Password:</label><input name="password" type="password" /></p>
<p class="submit">
<input name="Login" type="image" id="Login" value="Login to my account" src="images/login-button.png" />

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...