|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-06 13:36 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 19:00:01 2025 UTC |
Description: ------------ the code is Ajax Country/Area Drop-down List Example but on oracle not on mysql , the code must appear the area or on my code subcategory drop down list in Arabic but it is appear as stars ,you make encode as windows 1256 and utf-8 and does not appear what the solution,if there is a solution for populate drop down list from another on oracle send to me,thanks for interest Reproduce code: --------------- <?php // This is a very simple data provider for the cascading dropdown // example. A *real* data provider would most likely connect to // a database, use xslt and implement some level of security. Header("Content-type: text/xml"); // get query string params //$filter = $_GET['filter']; $filter = 1; $xml = ''; $iscountry = 1; // // build xml content for client JavaScript $conn = oci_connect("mohammadabed","0599397083","172.16.209.23:1521/XE") or die("couldnot conncet to database"); $query = "SELECT * from DOC_categories where ID_PERANT_DOC_CATEGORIES = '$filter'"; $stmt = oci_parse($conn ,$query); oci_execute($stmt); while ($row = oci_fetch_array ($stmt, OCI_BOTH)) { if ($iscountry == 1) { $xml = $xml . '<continent name="' . $filter . '">'; } $xml = $xml . '<country id="' . $iscountry . '">' . $row[1] . '</country>'; // $xml= convert_uuencode($xml); //echo "the value is ".$row[1]; $iscountry = $iscountry + 1; } $xml = $xml . '</continent>'; if ($iscountry == 1) { $xml = $xml . '<continent name="none">'; $xml = $xml . '<country id="0">no element found</country>'; $xml = $xml . '</continent>'; } // send xml to client echo ($xml); ?> Expected result: ---------------- the second drop down list appear in Arabic as in database Actual result: -------------- the second drop down list appear in stars or asterisks not as in database