|
|
|
#1 |
|
the friendly canadian
Join Date: Feb 2004
Location: Singapore
Posts: 2,017
|
PHP Quandry - Oh the joys..
Alright, so I'm still struggling with PHP, and I haven't had time to really dive into it since I've been working full-time with summer school at night, and I've run into this issue.
What I want to do is have a hybrid page, HTML, with Flash navbar. Now, on my navbar, I want to have a login/password box (with forgot password? register). Now, when you click on register, I want it to appear in the HTML portion as a sign up ala phpBB. The issue I want to do is have it so that I manually give out confirmation numbers to people when they register. They put this number in, and can sign up. Without it, no signup. I am trying to prevent just anyone from signing up, this is for a club at my university, and I only want members to be able to access the members area. When they pay their membership fee, I will give them a unique code that they will enter when signing up. This will allow them to create an account. Is this possible to do, if so, how? Also, how can I have it so those same usernames get registered on the forum and are active there aswell. This is the current code in Flash: Submit button Code:
on (release)
{
if(userName.length > 0 && userPassword.length > 0)
{
myVars = new LoadVars();
myVars.username = userName.text
myVars.pass = userPassword.text
myVars.action = 'login';
myVars.sendAndLoad(php_file, myVars, 'POST');
myVars.onLoad = function()
{
if(!this.error && this.user > 0)
{
_root.gotoAndStop('registered');
} else {
_root.gotoAndStop('no_registered');
}
userName.selectable = true;
userPassword.selectable = true;
loginButton.enabled = true;
}
userName.selectable = false;
userPassword.selectable = false;
loginButton.enabled = false;
}
}
user.php PHP Code:
If anyone can help, that would be amazing. If you have anything to contribute, please post. Any reply is better than no reply. I appreciate the help, DaVULf
__________________
![]() vs. Natsia : vs. NepZap & Jwin : vs. Zebrafire : vs. Pea3698 : vs. Adobemedia : vs. SilverX2 : vs. Ctranter |
|
|
|
|
|
#2 |
|
the friendly canadian
Join Date: Feb 2004
Location: Singapore
Posts: 2,017
|
Nobody has anything to say?
__________________
![]() vs. Natsia : vs. NepZap & Jwin : vs. Zebrafire : vs. Pea3698 : vs. Adobemedia : vs. SilverX2 : vs. Ctranter |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: May 2005
Posts: 27
|
I cannot help you with everything. However I have found this the most successful sendAndLoad application:
Your use of myVars for your reply could cause problems. Code:
{ myVars = new LoadVars();
MyReply= new LoadVars();
myVars.username = userName.text
myVars.pass = userPassword.text
myVars.action = 'login';
MyVars.sendAndLoad('your.php, MyReply);
MyReply.onLoad = UpdateReply; ///don't put brackets '()'
}
function UpdateReply(success) {
if (success) {
_root.Vareply = MyReply;
} else {
_root.Vareply = "Failed";
}
}
|
|
|
|
|
|
#4 |
|
the friendly canadian
Join Date: Feb 2004
Location: Singapore
Posts: 2,017
|
Great, thanks newboy. I'll have to switch that up.
__________________
![]() vs. Natsia : vs. NepZap & Jwin : vs. Zebrafire : vs. Pea3698 : vs. Adobemedia : vs. SilverX2 : vs. Ctranter |
|
|
|
|
|
#5 |
|
the friendly canadian
Join Date: Feb 2004
Location: Singapore
Posts: 2,017
|
Okay, what newboy suggested has now been implemented, but although helpful (and thanks a bunch man), this does not contribute to the bulk of the problem.
As I say, I know some people on here know how to fix this, so could I please get you to help a brother out. I know I've been asky lately, but I've been swamped at work, and I don't have the time I did back when school was still in. Once I'm back at school I will have time to research all of this instead of just asking, but I need things done long before then, so I need your collective help. I appreciate the help, DaVuLf
__________________
![]() vs. Natsia : vs. NepZap & Jwin : vs. Zebrafire : vs. Pea3698 : vs. Adobemedia : vs. SilverX2 : vs. Ctranter |
|
|
|
|
|
#6 |
|
associate
Join Date: Oct 2001
Location: is
Posts: 1,347
|
So you want someone to come to the site. Register, then you manually confirm the registration?
__________________
websitedesignby.com |
|
|
|
|
|
#7 |
|
the friendly canadian
Join Date: Feb 2004
Location: Singapore
Posts: 2,017
|
That's correct.
The only people that I will confirm registration for, are people who have been pre-authorized by me giving them a registration code in person.. Similar to a CD-Key for a program. As I explained, this is because only people who are members of the club are to have access. To be a member of the club you have to sign up on campus, and pay the club fee and I will give them the registration key.
__________________
![]() vs. Natsia : vs. NepZap & Jwin : vs. Zebrafire : vs. Pea3698 : vs. Adobemedia : vs. SilverX2 : vs. Ctranter |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|