close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Registration page not working

Thread began 4/16/2010 11:58 am by gjdunn405023 | Last modified 4/20/2010 10:11 am by gjdunn405023 | 2600 views | 12 replies |

gjdunn405023

Registration page not working

More problems.

After setting up a Registration page, removing some of the fields from the page and from the database; I tested the page and found that the information did not transfer to the database, and more curiously, the information entered into the fields remained visible after the "Register" button was triggered, and even worse, it remained visible after quitting the browser and returning to the Registration page.

Any help appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

line 50 - 69 of the registration page performs validation on the form fields:

php:
<?php 

if ($_SERVER["REQUEST_METHOD"] == "POST")  {
  
$WAFV_Redirect "";
  
$_SESSION['WAVT_usersRegistration_Errors'] = "";
  if (
$WAFV_Redirect == "")  {
    
$WAFV_Redirect $_SERVER["PHP_SELF"];
  }
  
$WAFV_Errors "";
  
$WAFV_Errors .= WAValidateNM($totalRows_CheckRepeat "",-1,0,"",",.",true,1);
  
$WAFV_Errors .= WAValidateEM(((isset($_POST["UserEmail"]))?$_POST["UserEmail"]:"") . "",true,2);
  
$WAFV_Errors .= WAValidateEL(((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:"") . "",6,50,true,3);
  
$WAFV_Errors .= WAValidateRX(((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:"") . "","/[0-9]/",true,4);
  
$WAFV_Errors .= WAValidateRX(((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:"") . "","/[a-z,A-Z]/",true,5);
  
$WAFV_Errors .= WAValidateLE(((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:"") . "",((isset($_POST["UserPassword2"]))?$_POST["UserPassword2"]:"") . "",false,6);
  
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_code"]))?strtolower($_POST["Security_code"]):"") . "",((isset($_SESSION["captcha_1"]))?strtolower($_SESSION["captcha_1"]):"") . "",true,7);
  
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_question"]))?strtolower($_POST["Security_question"]):"") . "",((isset($_SESSION["random_answer"]))?strtolower($_SESSION["random_answer"]):"") . "",true,8);
  
$WAFV_Errors .= WAValidateRX(((isset($_POST["addblock"]))?$_POST["addblock"]:"") . "","/^$/i",false,9);
  
$WAFV_Errors .= WAValidateRX(((isset($_POST["secondblock"]))?$_POST["secondblock"]:"") . "","/^$/i",false,10);
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["UserFirstName"]))?$_POST["UserFirstName"]:"") . "",true,11);
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["UserLastName"]))?$_POST["UserLastName"]:"") . "",true,12);
  
$WAFV_Errors .= WAValidatePN(((isset($_POST["UserPhone"]))?$_POST["UserPhone"]:"") . "",false,true,true,13);
  
$WAFV_Errors .= WAValidatePN(((isset($_POST["UserFax"]))?$_POST["UserFax"]:"") . "",false,true,false,14);
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["UserAddress"]))?$_POST["UserAddress"]:"") . "",true,15);
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["UserCity"]))?$_POST["UserCity"]:"") . "",true,16);
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["UserState"]))?$_POST["UserState"]:"") . "",false,17);
  
$WAFV_Errors .= WAValidateZC(((isset($_POST["UserZip"]))?$_POST["UserZip"]:"") . "",true,true,true,true,true,18);
  
$WAFV_Errors .= WAValidateRQ(((isset($_POST["UserCountry"]))?$_POST["UserCountry"]:"") . "",true,19);

  if (
$WAFV_Errors != "")  {
    
PostResult($WAFV_Redirect,$WAFV_Errors,"usersRegistration");
  }
}
?>




if you delete a form field, you will need to also delete the validation for that form field.


for example, if you delete the phone number form element, you will need to delete the following validation line:

php:
WAValidatePN(((isset($_POST["UserPhone"]))?$_POST["UserPhone"]:"") . "",false,true,true,13);
Sign in to reply to this post

gjdunn405023

After deleting the indicated code, the following errors occurred:

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /Library/WebServer/Documents/worldmix/UserRegistration100/users_Registration.php on line 100

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /Library/WebServer/Documents/worldmix/UserRegistration100/users_Registration.php on line 104

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of the page so I can see the code.

Sign in to reply to this post

gjdunn405023

users_Registration.php

Sign in to reply to this post

Jason ByrnesWebAssist

I need to be able to see the php code.

Please compress the page into a zip archive and attach the zip file to your reply.

Sign in to reply to this post

gjdunn405023

As requested.

Attached Files
users_Registration.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

you have removed the line to connect to the connections/localhost.php file.

Add the following at line 1:
<?php require_once('Connections/localhost.php'); ?>



make sure to edit the Connections/localhost.php file with the correct information to connect to your database.

Sign in to reply to this post

gjdunn405023

Thank you for the response.

When I first set up the db files, I chose an existing mysql db connection which is shown in Line 7. It appears in the Dreamweaver Application windows correctly with the appropriate tables, and in the root Connections folder.

After adding "Connections/localhost.php" in line 1, and trying to register, I get "Unknown column 'UserCity' in 'field list'".

Thanks for your patience.

Sign in to reply to this post

Jason ByrnesWebAssist

you must use the localhost connection with the User registration solution pack.

Also, you will need to use the users table that is shipped with the user registration solution pack.


In the database folder, there is a users.sql file that can be used to create the users table. see the following for instructions:
ursp_importing_sql.pdf

Sign in to reply to this post
loading

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