Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Simple registration form
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Simple registration form

 Post Reply Post Reply Page  12>
Author
moti View Drop Down
Groupie
Groupie


Joined: 07 September 2004
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote moti Quote  Post ReplyReply Direct Link To This Post Topic: Simple registration form
    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

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2004 at 4:07am
Yes when going from registration rules to the registration page pass across the following queryString:-

?FPN=1
Back to Top
moti View Drop Down
Groupie
Groupie


Joined: 07 September 2004
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote moti Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
moti View Drop Down
Groupie
Groupie


Joined: 07 September 2004
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote moti Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2004 at 11:02pm
hey somebody help me.
Back to Top
moti View Drop Down
Groupie
Groupie


Joined: 07 September 2004
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote moti Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2004 at 6:06am

hey borg where are you

please help me I need it

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
theSCIENTIST View Drop Down
Senior Member
Senior Member


Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
Post Options Post Options   Thanks (0) Thanks(0)   Quote theSCIENTIST Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
theSCIENTIST View Drop Down
Senior Member
Senior Member


Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
Post Options Post Options   Thanks (0) Thanks(0)   Quote theSCIENTIST Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.