Jump to content

Help please


rjliquigan

Recommended Posts

okay i wrote this first to enter a username to the database:

$usercheck = $_POST['username'];

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

or die(mysql_error());

$check2 = mysql_num_rows($check);

 

everything works and writes perfectly to the database. Now i want to change it so instead of username it will be an email so i need to put special characters @ and "." so i used this:

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

it takes out the @ and "." but it wont write to any other tables.

 

Please help, thank you so much!

Link to comment
https://forums.phpfreaks.com/topic/182454-help-please/
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.