Print Page | Close Window

Simple registration form

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=11727
Printed Date: 09 April 2026 at 4:18am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Simple registration form
Posted By: moti
Subject: Simple registration form
Date Posted: 07 September 2004 at 9:15pm

Hi, all

is there any way or mod to allow switch between simple and full registration form

Simple :  Username - Password - mail - Security Code

Full : Full form

thanks




Replies:
Posted By: WebWiz-Bruce
Date Posted: 08 September 2004 at 4:07am
Yes when going from registration rules to the registration page pass across the following queryString:-

?FPN=1


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: moti
Date Posted: 08 September 2004 at 7:44am

Hi,

Thanks for you reply

but I tested it and it don`t work

and it tell me insufficient permission for this page

this work just when I am loged in

 

is there any way

thanks



Posted By: moti
Date Posted: 08 September 2004 at 11:02pm
hey somebody help me.


Posted By: moti
Date Posted: 10 September 2004 at 6:06am

hey borg where are you

please help me I need it



Posted By: WebWiz-Bruce
Date Posted: 10 September 2004 at 8:40am
Sorry I'm very busy at the moment preparing to go back to Uni and don't have the time to go through the code for you as it looks like it maybe more difficult than I thought.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: theSCIENTIST
Date Posted: 10 September 2004 at 9:21am

moti, yes it does work, maybe you have done something wrong, change it like this:

<form method="post" name="frmregister" action="register.asp?FPN=1&FID=<% = Server.HTMLEncode(intForumID) %>">

Note the FPN=1 and the (&) after it, that's all you have to insert, or just copy the whole line above and replace yours.

Thanks.



Posted By: theSCIENTIST
Date Posted: 10 September 2004 at 3:33pm

moti, I'm sorry for the post above, I should've researched the matter thoroughly, you are right, just passing FPN=1 along to register.asp won't do it, the reason is that the new registration page will not include all data, and some of this data is expected by SQL server which has fields of the NOT NULL type.

So I set on to providing this fields with some default values, the fields in question are all in tblAuthor, and I gave the values that suited my case, should be alright for you, and the user can change them later, but you are free to change them:

.Fields("Show_email") = 0
.Fields("Attach_signature") = 0
.Fields("Time_offset") = "+"
.Fields("Time_offset_hours") = 0
.Fields("Date_format") = "dd/mm/yy"
.Fields("Rich_editor") = 0
.Fields("Reply_notify") = 0
.Fields("PM_notify") = 0

The next challenge was to find the proper place in register.asp to pass these default values, and I found it, it must be a place where only runs when it's a new registration and nothing else, so, open your file, under the (Update datbase) section (yes its mispelled in your file also), slighly under that, look for these lines:

If strMode = "new" Then .Fields("Username") = strUsername
If strMode = "new" Then .Fields("Group_ID") = intForumStartingGroup

Replace those lines with:

'Removed by tSC and replaced below
'If strMode = "new" Then .Fields("Username") = strUsername
'If strMode = "new" Then .Fields("Group_ID") = intForumStartingGroup

If strMode = "new" Then
  .Fields("Username") = strUsername
  .Fields("Group_ID") = intForumStartingGroup

  'Added by tSC to allow simple reg FPN=1 (intUpdatePartNumber=1) populate not null fields
  If intUpdatePartNumber = 1 Then
    .Fields("Show_email") = 0
    .Fields("Attach_signature") = 0
    .Fields("Time_offset") = "+"
    .Fields("Time_offset_hours") = 0
    .Fields("Date_format") = "dd/mm/yy"
    .Fields("Rich_editor") = 0
    .Fields("Reply_notify") = 0
    .Fields("PM_notify") = 0
  End If

End If

Note: this is all under (With rsCommon) and before ('If part number = 0 (all) or part 1) note the (1) not (2).

I always add a ('Added by tSC...) comment, so I always know what I have changed, and I could search files for tSC and get my changes easily, you can change that if you want. Also note, I created a (If intUpdatePartNumber = 1) condition, so the code only runs if you want a simple reg form, when you change registration_rules back to its original state (not passing FPN=1) to get a full reg form, my code won't cause any problems what so ever.

It was all tested, in many different ways.

Hope this could be useful for you, or anyone else trying to implement a simple reg form.



Posted By: moti
Date Posted: 10 September 2004 at 6:17pm

Hi

thank you   theSCIENTIST   and thank you borg

its working but it has many problems and I can`t use this simple form it show me many errors like this:

 

Microsoft OLE DB Provider for SQL Server error '80040e2f'

Cannot insert the value NULL into column 'PM_notify', table 'forum03.dbo.tblAuthor'; column does not allow nulls. INSERT fails.

/forum 7.7 SQL/forum Full/register.asp, line 974

its show me many errors like above error with different columns

is there any way

in fact I want hide unnecessary fields some users will not register when see the big form

is there any way to hide some sections

thanks



Posted By: theSCIENTIST
Date Posted: 13 September 2004 at 4:23pm

It shouldn't give any errors after my code has been properly inserted, my code caters for the fact that the SQL database in particular the tblAuthor is expecting some default values.

Note one of your errors: " Cannot insert the value NULL into column 'PM_notify', table 'forum03.dbo.tblAuthor'; column does not allow nulls. INSERT fails. "

My code adds the default value of '0' to PM_notify so it won't error out.

I have been using the simple reg form ever since you asked for it, and my users are happily reging, no errors, no problems.

Are you sure you have followed the instructions above to the letter?



Posted By: moti
Date Posted: 14 September 2004 at 5:39am

oh no  it`s working fine, I posted my previous message before you post, The moderator did not accept it

its good and work fine thank you so much buddy

 



Posted By: theSCIENTIST
Date Posted: 14 September 2004 at 11:15am

Ah, great, my complete explanation on modding the register.asp also took a great deal of time to pass moderator(s) censorship, that's why all the out of sync replies.

Glad it's working for you also.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net