SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 30 of 30
  1. #26
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    , , , ', among others character encoding

  2. #27
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Are you aware that the die() command stops the script from processing? It's only there for test purposes, so you should remove it, and the var_dump as well.

    As it seems to be confirmed that the data is getting through to the database part alright, the next place to look at is your database itself.

    If you create a string in php that includes extended characters, are you able to save just that to the database. It could be the encoding of the database fields doesn't allow the encodings that you're wanting to use.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #28
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I wonder how where can find out about the encoding of the database field?

    so i can check it out because I took out the die(); and the vardump and still doesn't rate those character encoding letters.

    The script looks like this

    PHP Code:
    if (Rating::CheckRatingsByIp($varItem) == 0)
              { 
                
    $escapedVarItem mysql_real_escape_string($_GET[$varItem]);

                
    $ipAddress $_SERVER['REMOTE_ADDR'];
                
                
    Database::ExecuteQuery("INSERT INTO `rating` (`item_name`, `rating`, `ip_address`, `date_rated`) VALUES ('{$escapedVarItem}', {$varRating}, '{$ipAddress}', NOW())""InsertRating");
                
    Database::FetchResults("InsertRating");
                
    Database::FreeResults("InsertRating");
                
    Database::RemoveSavedResults("InsertRating"); 
    do I have to place $escapedVarItem =
    mysql_real_escape_string($_GET[$varItem]);
    inside the method (outside the if statement) or inside the if statement. Or maybe the problem is in the encoding database field...

  4. #29
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey pmw

    I have tried to change the collation of the table to "latin1_spanish_ci" to see if it was to affect the encoded characters but it still don't work does any body has any suggestion?

  5. #30
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Not I sorry, but there should be a couple of people here in the PHP forum who know something about database character encoding issues.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

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