close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Membership registration with existing membership database

Thread began 4/06/2011 9:04 am by Dennis | Last modified 5/12/2011 1:36 pm by Dennis | 3363 views | 11 replies

Jason ByrnesWebAssist

1) in the number validation, you have set the minimum number to 0, set it to 1 instead.


2) The code for the recordset is at lines 20 - 60:

php:
<?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";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

$colname_rsMemberAreaReg "-1";
if (isset(
$_POST['Email_M1'])) {
  
$colname_rsMemberAreaReg = (get_magic_quotes_gpc()) ? $_POST['Email_M1'] : addslashes($_POST['Email_M1']);
}
mysql_select_db($database_connOESCA$connOESCA);
$query_rsMemberAreaReg sprintf("SELECT Member_Account_ID, Email_M1 FROM member_accounts WHERE Email_M1 = %s AND Registered = 0"GetSQLValueString($colname_rsMemberAreaReg"text"));
$rsMemberAreaReg mysql_query($query_rsMemberAreaReg$connOESCA) or die(mysql_error());
$row_rsMemberAreaReg mysql_fetch_assoc($rsMemberAreaReg);
$totalRows_rsMemberAreaReg mysql_num_rows($rsMemberAreaReg);?>




move it to line 5 so the recordset is created before the validation occurs.

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

Content

rating

Layout

rating

Ease of use

rating

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...