[freeside-users] Registration Code Problem Solved But �
webmaster
webmaster at vbkeys.com
Thu Dec 22 03:26:32 PST 2005
Hi,
When I tried to enter a registration code in the regcode.html and
click on Signup, it submits the form to itself and it doesnt bring
me to the signup page.
I read the regcode.html file I found the following HTML/JavaScript code:
<HTML><HEAD><TITLE>ISP Signup</TITLE></HEAD>
<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>ISP Signup - registration code</FONT><BR><BR>
<SCRIPT>
function gotoURL(object) {
window.location.href = 'signup.cgi?reg_code=' + object.reg_code.value;
}
</SCRIPT>
<FORM>
Enter registration code <INPUT TYPE="text" NAME="reg_code">
<INPUT type="submit" VALUE="Signup" onClick="gotoURL(this.form)">
</FORM>
</BODY>
</HTML>
I change that code to:
<HTML><HEAD><TITLE>ISP Signup</TITLE></HEAD>
<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>ISP Signup - registration code</FONT><BR><BR>
</SCRIPT>
<FORM action="sign.cgi"> <-------VARIATION
Enter registration code <INPUT TYPE="text" NAME="reg_code">
<INPUT type="submit" VALUE="Signup">
</FORM>
</BODY>
</HTML>
Now it works properly, when I enter a registration code and I
click on Submit it brings me to the signup page and it automatically
selects the desired package and it hides the other entire package,
this is what Im looking for. But it still has a big problem!
When I enter a wrong registration code, it brings me to the signup
page and it doesnt select any package, and it let me select
any package I wish with my prepaid card!
How can I prevent the user from selecting the package
if he/she enters a wrong Registration code?
In fact my problem is:
I created 3 packages:
Pkg1: 10$
Pkg2: 20$
Pkg3: 30$
And I created 3 types of prepaid cards 10$, 20$ and 30$
If a user buy the 20$ prepaid card, so he can enter to
the signup page and select Pkg3 (30$) and enters his
prepaid card, and the system will register him!!
While he pays only 20$, I think the registration
code is dedicated to solve such problem.
Thanks for your time
Sameh
More information about the freeside-users
mailing list