PDA

View Full Version : Username whitelist submit form


moviemastersdk
01-13-2012, 08:15 AM
I have a website set up for a minecraft server that i'm hosting,

and i have a php page with a signup form for the server whitelist, where people fill in their
Name:
Age:
Email:
Country:
Minecraft Username:

on the site i also have a phpbb forum set up with mysql database,

the thing i would to know, is that if it's possible to check if the email and/or username is registered on the forums, and then tell them to register on the forums before signing up for the whitelist,(If there is no match)

Short. Version

User types in his credentials

Clicks submit

Server checks if the username I registered on the phpbb forum

If the username is found
He gets a you are now white listed message

If username not found
He gets a please register on the forums. Message

End



Thx in advance

edbr
01-13-2012, 08:33 AM
you need to select the database then use conditions
along the lines of but not tested

if ($_POST['email'} == $row["email']) { header( 'Location: http://www.yoursite.com/white_page.html' ) ;}

else{ header( 'Location: http://www.yoursite.com/sign_up_page.html' ) ;}

moviemastersdk
01-13-2012, 06:57 PM
hmm, could you maybe explain in a little more detail,
like split the code in different parts, and describe what they do
i would very much like to learn how it works, instead of just using the codes :)

domedia
01-13-2012, 09:47 PM
Yo would have know some basic PHP to make this work.

edbr
01-14-2012, 12:56 AM
Start with the tutorials on this forum http://www.dreamweaverclub.com/php-tutorials.php.

It too much to do in posts here. it is a valuable language to get a working knowledge off if you do go for it.
On your request i should say if you get further with it , you should be aware of some security, at least sanitising the info from the form as it might provide a backdoor into the databse from ne'er do wells