SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem php script output

    Hi all
    Wrote a script. PHP to connect to Microsoft Access. Access the information. Language is Persian. When this information see the Web browser. The unknown shows. this is The problem. I did the following.

    Code:
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    </head>
    Another thing you need to

    Thank's

  2. #2
    SitePoint Wizard frank1's Avatar
    Join Date
    Oct 2005
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ? not clear...can u explain some more...?

  3. #3
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    Quote Originally Posted by frank1 View Post
    ? not clear...can u explain some more...?
    this is code :
    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    </head>
    <body>
    
    <?php
    header ('Content-type: text/html; charset=utf-8');
    $conn=odbc_connect('arshad','','');
    if (!$conn)
      {exit("Connection Failed: " . $conn);}
    $sql="SELECT * FROM arshad";
    $rs=odbc_exec($conn,$sql);
    if (!$rs)
      {exit("Error in SQL");}
    
    echo "Studnet number:";
    echo "<br />";
    $i=1;
    while (odbc_fetch_row($rs))
      {
        echo $i . " : ";
    	$namm=odbc_result($rs,"namm");
    	$stno=odbc_result($rs,"stno");
    	$i++;
        echo "$namm";
    	echo "$stno ";
    	echo "<br />";
      }
    odbc_close($conn);
    
    ?>
    
    </body>
    </html>
    In the above code. When information is displayed. A number of fields. Persian language is stored. When information is to call. All fields are shown correctly except that the Persian is stored in fields.
    Values stored in them a question mark or uncertain characters

    What to do to correct?????

    output code above: http://www.2shared.com/file/10112947/34bcdb5d/tif.html

  4. #4
    SitePoint Wizard frank1's Avatar
    Join Date
    Oct 2005
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    make sure that collation of filed which stores that unicode values are uft8_unicode or something or similar that can support unicode

    in add or edit and display page make sure you have this
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

    i am afraid for field value already there u may have to re import sometime
    just give a try and test

  5. #5
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did not respond , Problem is strange. Help me


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
  •