Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-18-2016, 11:35 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 157,619
Abronsyth is on a distinguished road
Default

OK, so there's this chunk of code;
Code:
      if($username == "SYSTEM"){
         $this->seterror("Cannot use SYSTEM as username.");
         return FALSE;
      }
But I'm wondering if I could do something like this to make it so the only characters that can be entered are alphanumeric and spaces? So if a user tries something like; "user_name" then they'll get the error; "Sorry, you cannot use special characters in your username."

Some folks use this sort of code;
PHP Code:
if(preg_match('/^[a-zA-Z0-9 ]+$/'$username)) {

Do y'all think I'd be able to incorporate that somehow..?
__________________
My Mods Site (1.3.4, 2020 Mods)

Last edited by Abronsyth; 02-18-2016 at 11:44 AM.
Reply With Quote
 

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 -5. The time now is 04:20 PM.

Currently Active Users: 3648 (0 members and 3648 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636