logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 01-13-2012, 07:15 AM   #1
moviemastersdk
 
Join Date: Dec 2011
Posts: 33
Question 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
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
moviemastersdk is offline   Reply With Quote
Old 01-13-2012, 07:33 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,162
Default

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' ) ;}
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 01-13-2012, 05:57 PM   #3
moviemastersdk
 
Join Date: Dec 2011
Posts: 33
Default

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
moviemastersdk is offline   Reply With Quote
Old 01-13-2012, 08:47 PM   #4
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Yo would have know some basic PHP to make this work.
domedia is offline   Reply With Quote
Old 01-13-2012, 11:56 PM   #5
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,162
Default

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
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:13 AM.


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