Jump to content

need help email


rjliquigan

Recommended Posts

Hi all,

I'm having problems with writing @ and "." I'm having a user name as their email address but its not working properly, if i dont use speacial characters it works fine. So i used a string to pull out the @ . sign but it doesnt work right. Hopefully someone here can help. heres what i got:

 

$usercheck = $_POST['username'];

$usercheck = preg_replace("/[^a-zA-Z0-9s]/", "", $usercheck);

$check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'")

or die(mysql_error());

$check2 = mysql_num_rows($check); 

Link to comment
https://forums.phpfreaks.com/topic/182453-need-help-email/
Share on other sites

Hi all,

I'm having problems with writing @ and "." I'm having a user name as their email address but its not working properly, if i dont use speacial characters it works fine. So i used a string to pull out the @ . sign but it doesnt work right. Hopefully someone here can help. heres what i got:

 

$usercheck = $_POST['username'];

$usercheck = preg_replace("/[^a-zA-Z0-9s]/", "", $usercheck);

$check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'")

or die(mysql_error());

$check2 = mysql_num_rows($check);

 

I tried your code with special characters and it worked fine. What problems are you having with it?

Link to comment
https://forums.phpfreaks.com/topic/182453-need-help-email/#findComment-964403
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.