473,394 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How can I ban a username on my site using php & MySQL?

I want to able to ban usernames on my site. I've got an interface for site admins to use and i've set up a database already. I don't want to ban IP addresses because there are ways around that. I know that people can just sign up again to avoid the ban, but I want to start with the basics for now, I can always make changes later. Does anyone know a script that can check the username from the session and cross reference it with the usernames from the database and if there's a match, the user will be redirected to another page?

Thanks in advance,
Justsomeguy :)
Oct 8 '10 #1
1 1245
JKing
1,206 Expert 1GB
Do you have a status field or similar field for users? You could set that to "banned" or if that is not an option create another field to be used as a flag for banned users. Then check to see if the user is not flagged before allowing them access.
Oct 8 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: madeo | last post by:
hi, i'm looking for some script which would export address labels from a mysql db to pdf ... There's an exapmle, but i'm not able to convert it for using with mysql ... can anybody help? THX...
0
by: Eric Linders | last post by:
Hello, Our company currently processes a few hundred form submissions through our site. Up till now, the contents of the form has been sent to our customer support staff in real-time. Each...
1
by: Anthony Davis | last post by:
Hello All, I have been using the MySQL control center and had my usernames and passwords for the MySQL server stored in the control center. I recently lost everything on my PC including the...
3
by: Brian | last post by:
Hi, I've been trying to find a way to upload file to another site that is not using IIS. The site that I want to upload file to has a simple php script to receive file uploaded through standard...
1
by: John B. | last post by:
I have a site built with VS 2003 and .NET v1.1. I would like to continue maintaining it using the VS 2005 IDE. However, my hosting company does not support .NET 2.0 sites yet. Is it possible to...
3
by: Paul W Smith | last post by:
www.middlesexccl.com I am starting to think about re-writing the above web site using ASP.net. Can anyone give me any suggestions on how I will implement the nine different league tables using...
3
by: dlawner | last post by:
Anyone know a way to determine if a particular url is a trusted site using javascript? I need to validate that a site is trusted before the user logs on.
2
by: trochia | last post by:
Hello all, I am fairly new to php etc, and I have a database 1) I have already did a search for: "Results within results" on this site, in PHP & MySQL forums ( I think) properly...and one search...
2
by: benicio | last post by:
I now have completed my site using basic php/mysql Thanks to all who helped me with those errors I got. I use a ftp to publish my static website but don't how with PHP & MySQL and the...
2
by: necro1000 | last post by:
Hi, I am creating a website and I need some information off an online mySql database. Locally, I am using the MySql Connector provided by the mySql developers themselves. When I upload the page...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.