Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: allow é á etc

  1. #1
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    allow é á etc

    I've fixed, for those who had/have the same problem, ill put here the solution for it

    Code:
    Remove htmlentities at your anti sql injection code
    P.S Any idea on how to check multiple data?

    i've tryed this, but no success

    Code:
    $q = mysql_query("SELECT notes FROM banip,unbanip,logs ORDER BY date DESC LIMIT 0,7");
    if (mysql_num_rows($q) < 1 )
    Last edited by paulocoré; 01-18-2013 at 06:03 AM.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    That would also throw if I were to enter something such as O'Reily, so I think you'll need to re-evaluate what you are doing for detection.
    Until PHP 6 which is when I hope we get it, PHP is not multibyte native. You can make use of multibyte functionality with the mb_* functions; however, I do not believe there exists an mb_strcmp function. You can write one though. Probably a check against the length of both, and if they match you can then use something like the mb_substr_count to see if it counts 1.

    PCRE is classified as multibyte safe as well if you use the 'u' modifier, so you should be able to do comparisons using preg_match as well.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • Users who have thanked Fou-Lu for this post:

    paulocoré (01-18-2013)

  • #3
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I found out, removing HTML Entities, will let you write é á on form.


    Any idea on how to check multiple data ?

    i've tryed this, but i had no success.

    Code:
    $q = mysql_query("SELECT notes FROM banip,unbanip,logs ORDER BY date DESC LIMIT 0,7");
    if (mysql_num_rows($q) < 1 )
    Last edited by paulocoré; 01-18-2013 at 06:03 AM.

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    I don't understand what you mean by multiple. Do you mean in your query? That query would result in the newest 7 entries assuming the date is a DateTime or derivative type in mysql (ie not a string).
    If you need to show it, than you need to iterate it with a while loop and mysql_fetch_assoc or mysql_fetch_row.
    See the link in my signature as well. The mysql library will disappear soon and so you should replace it with mysqli or pdo.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


  •  

    Posting Permissions

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