Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7741521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:03:16+00:00 2026-06-01T09:03:16+00:00

i have this strange problem with the PHP function CTYPE_ALNUM if i do: PHP:

  • 0

i have this strange problem with the PHP function CTYPE_ALNUM

if i do:

PHP:

$words="àòè";


if(ctype_alnum($words)){

   Echo "Don't work";

}else{

   Echo "Work";     

}

this will echo out ‘Work’

BUT if i have a form and in that form i insert the letters with the grave like (à , è, ò) this will echo out ‘Don’t Work’

Code:

  <form action="" method="post"> 

    <input type="text" name="words" />
    <input type="submit" />

  </form>


 $words=$_POST['words'];

 if(isset($words)){

  if(ctype_alnum($words)){

      Echo "Don't Work";

  }else{

      Echo "Work";      

 }

}

If i insert into the text input the letters à or è or ò This will echo out ‘Don’t Work’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:03:17+00:00Added an answer on June 1, 2026 at 9:03 am

    ctype_alnum is locale-dependend. That means if you’re using the standard C locale or a common one like en_US, that won’t match accented letters, only [A-Za-z]. You can try setting the locale to a language that recognizes those derivations via setlocale (beware that the locale needs to be installed on your system, and not all systems are alike), or use a more portable solution like:

    function ctype_alnum_portable($text) {
        return (preg_match('~^[0-9a-z]*$~iu', $text) > 0);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this strange problem. I have this script: echo $comment_content = $_POST['comment_content']; echo
I have a strange problem using the Cosine formula in my PHP application.. function
I have a strange problem in php MySQL: php connects with 127.0.0.1 but not
i am having a strange problem, i have a static class like this public
I have a strange problem with php scripts - mysql_affected_rows() sometimes returns 0 for
I have a solution to the below problem in PHP. But it is taking
I have a very strange problem and i don't know what to do about
I have a strange problem. I've downloaded the latest php sdk. In there are
I have this strange problem. When debugging, I have sometimetimes code looking like this
I have problem that on server include() function does not want to work and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.