Jump to content

New to PHP preg replace help.


rjliquigan

Recommended Posts

Hello all, new to the php scene.

I'm having problems writing capital letters into the database: For example when i input MerryChristmas it will write erryhristmas or Testing123 it would be esting123. Any help would be greatly appreciated thank you heres what it looks like write now:

 

$groupname=$_POST['groupname'];

$newgroupname = preg_replace('/[^a-z0-9]/', '', $groupname);

$check2 = mysql_query("SELECT groupname FROM groups WHERE groupname = '$newgroupname'")

or die(mysql_error());

$check3 = mysql_num_rows($check2);

Link to comment
https://forums.phpfreaks.com/topic/182447-new-to-php-preg-replace-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.