ixian
02-21-2002, 04:40 AM
Howdy,
First of all, my license information is stored in my profile and I am a fully paid up and legal user. I see requests for this all the time so I thought I'd mention it:)
Here's what I'd like to do:
I am so-so at mySQL and PHP. I have created a separate database called adminmod for game server authentication, and a php page where users can enter their information so it gets stored in said database.
First off, I want to restrict this page so ONLY registered forum members can read it. This part is no problem - I already know the php code ( if ($bbyuserinfo[' userid'] - etc, etc) that restricts access that way. I got that down and use that for other areas of my site already.
Here's where it gets tricky.
Once a registered member enters their information on the page, I don't want them to be able to come back willy-nilly and keep adding in more usernames. They get one game server registration per forum membership. So I need to do more than simply verify they are members.
I was thinking that if, when someone registered (there are three fields in the table - username, wonid, and clan), the page automatically grabbed their forum username and insterted it into a row in the same table in the adminmod database, then if that same person tried to register again, I could do a db lookup that saw that FORUM username was already in the database and deny registration.
I imagine this would work - but I am too much of a n00b to figure it out:) Through lots of reseach and flipping through manuals I managed to get this far, but now I am stuck.
Could any mySQL/php guru's out there help me? I'd even be willing to pay cash for your time, or buy you an Amazon gift certificate or something. I need the actual syntax that I can put in the php page that:
grabs forum username (without user intervention - obviously, some fine folks would enter in different names to bypass the system if they had the option)
checks to see if it's in specified table/row in db
denies submission if it is
inserts it into specified table/row in db if it isn't
Any takers?
Thanks!
First of all, my license information is stored in my profile and I am a fully paid up and legal user. I see requests for this all the time so I thought I'd mention it:)
Here's what I'd like to do:
I am so-so at mySQL and PHP. I have created a separate database called adminmod for game server authentication, and a php page where users can enter their information so it gets stored in said database.
First off, I want to restrict this page so ONLY registered forum members can read it. This part is no problem - I already know the php code ( if ($bbyuserinfo[' userid'] - etc, etc) that restricts access that way. I got that down and use that for other areas of my site already.
Here's where it gets tricky.
Once a registered member enters their information on the page, I don't want them to be able to come back willy-nilly and keep adding in more usernames. They get one game server registration per forum membership. So I need to do more than simply verify they are members.
I was thinking that if, when someone registered (there are three fields in the table - username, wonid, and clan), the page automatically grabbed their forum username and insterted it into a row in the same table in the adminmod database, then if that same person tried to register again, I could do a db lookup that saw that FORUM username was already in the database and deny registration.
I imagine this would work - but I am too much of a n00b to figure it out:) Through lots of reseach and flipping through manuals I managed to get this far, but now I am stuck.
Could any mySQL/php guru's out there help me? I'd even be willing to pay cash for your time, or buy you an Amazon gift certificate or something. I need the actual syntax that I can put in the php page that:
grabs forum username (without user intervention - obviously, some fine folks would enter in different names to bypass the system if they had the option)
checks to see if it's in specified table/row in db
denies submission if it is
inserts it into specified table/row in db if it isn't
Any takers?
Thanks!