Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Torrent Strike (http://www.bvlist.com/forumdisplay.php?f=21)
-   -   Signup Problem =P (http://www.bvlist.com/showthread.php?t=1536)

Hardstylerz 9th December 2008 14:03

Signup Problem =P
 
Hey..

I have a problem =P

When signup an accout, then your gonna write you wholy email.
But i want a dropdown menu that u can choose what email you have!

Like this: fidde_norberg [Dropdown menu]
|@hotmail.com]
|@spray.se]
|@yahoo.com]
|@live.se]

__________________________________________________ ______________

Here is a screenshot:

http://i411.photobucket.com/albums/p...z/dropdown.jpg



And my question is: How do i get it to work?


Thanks for helping! =D

johnake 9th December 2008 14:29

in your signup.php file near:

PHP Code:

<tr valign=top><td align="right" class="heading">Email address:</td><td align=left><input type="text" size="40" name="email" /> 

append:
PHP Code:

<select name="maildomain"><option value="@gmail.com">@gmail.com</option><option value="@yahoo.com">@yahoo.com</option></select

you can use as many option values as you may.

in takesignup.php:

PHP Code:

if (!mkglobal("wantusername:wantpassword:passagain:email))
die(); 

replace with:
PHP Code:

if (!mkglobal("wantusername:wantpassword:passagain:email:maildomain))
die(); 

PHP Code:

if (!validemail($email))
    
bark("That doesn't look like a valid email address."); 

replace with:

PHP Code:

if (!validemail($email.$maildomain))
    
bark("That doesn't look like a valid email address."); 

replace:
PHP Code:

$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where email='$email'"))) or die(mysql_error()); 

with:
PHP Code:

$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where email='$email.$maildomain'"))) or die(mysql_error()); 

and in the big query:

INSERT INTO users (username, passhash, secret, editsecret, email....

where you see $email

replace it with $email.$domain.

And thats about it!

An alternative solution is to create a table like maildomain where you can put allowed domains.

Note: this is done with tbdev source. Didn't had the time of installing tstrike but the differences are not that great.

Cheers.

Hardstylerz 9th December 2008 14:42

Thanks! =D
 
Thanks! It worked!

Ps! Sorry for my bad english! Im swedish :/ =P


But in profile i only get "myemail" not "myemail@example.com"?

joeroberts 3rd February 2009 06:47

So what would I do If I wanted to sign up on your site due to the fact you probly do not have my mail domain In your list?


All times are GMT +2. The time now is 00:53.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.