Dreamweaver Club Forums

Dreamweaver Club Forums (http://www.dreamweaverclub.com/forum//index.php)
-   PHP (http://www.dreamweaverclub.com/forum//forumdisplay.php?f=188)
-   -   Username whitelist submit form (http://www.dreamweaverclub.com/forum//showthread.php?t=42404)

moviemastersdk 01-13-2012 07:15 AM

Username whitelist submit form
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
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


Thx in advance

edbr 01-13-2012 07: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 05: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 08:47 PM

Yo would have know some basic PHP to make this work.

edbr 01-13-2012 11:56 PM

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

All times are GMT. The time now is 11:31 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com