Results 1 to 4 of 4

Thread: preg_match

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260

    preg_match

    javascript :
    Code:
    validName = /^[a-zA-Z---_ ]+$/.test(checkName);
    .

    :

    PHP Code:
    if(preg_match('/^[a-zA-Z--\-_ ]+$/',$checkName)) 
    .

    :
    PHP Code:
    if(preg_match('/^[a-zA-Z--\-_ ]+/',$checkName)) 
    , , - Stirng2323 .

  2. #2
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    .
    /u UTF-8 .
    \s
    , , - . .
    $checkName $_GET/POST , urlencode .., ..

  3. #3
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260
    $checkName= mysql_real_escape_string(htmlspecialchar s(strip_tags($_POST['checkName'])));

    PHP: 5.2.9

    PHP Code:
    preg_match('/^[a-zA-Z--\-_\s]+$/u' 
    .

    /u.

  4. #4
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    /u, , UTF-8 (-), .

    mysql_real_escape_string() htmlspecialchars preg_match . , - HTML .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |