Jump to content

Special Characters


millercj

Recommended Posts

Hi everyone,

          I'm having some issues with a script. I want it to examine a string and simply report a true/false whether there are special characters in the string.

 

I found an example on line and tried to adapt it to what i'm tryig to do but no matter the input it is spitting out a 0

 

This is what i have

<?PHP
$input=$_POST['input'];
$review = preg_match('/!@#$%^&*()/',$input);
echo $review;
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/97310-special-characters/
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.