Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] OT-Japanese in PHP



Hi All,

ok, I recompiled php to support J. Below are my settings,

output_handler = mb_output_handler
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = SJIS
mbstring.encoding_translation = On
mbstring.detect_order = auto
mbstring.substitute_character = none
mbstring.internal_encoding = EUC-JP

Now, I think I still haven't got the page that requires J, displayed 
right, yet. Full code is below. Can anyone see any mistakes..? Cheers.

Mark Sargent.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; 
charset=Shift-JIS" />
<title>Jumbo Status-Product Details</title>
</head>
<body lang="ja">
<hr>
<h1 align="center">JUMBO STATUS</h1><p>
<center>Used Hardware Specialist</center>
<center><a href="index.php">Home</a></center>     <center><a 
href="search.php">Search</a></center>
<hr>
<table align="center" bgcolor="lightblue" cellpadding="2" border="2" 
width="60%">
<?php
$db = mysql_connect("localhost", "????", "?????");
if (!$db) {
  echo "no connection because " . mysql_error();
  exit;
}
mysql_select_db("status", $db);
if (isset($_REQUEST[product_id])) {
   $product_id = $_REQUEST[product_id];
$result = mysql_query("SELECT Products.product_id, 
Products.product_name, Products.product_model_number, 
Products.product_price, Products.product_qty, Products.product_desc, 
Products.product_data_output, Conditions.condition_detail FROM Products 
INNER JOIN Conditions On Products.condition_id = Conditions.condition_id 
WHERE Products.product_id = '$product_id'");
if (!$result) {
    echo "Query failed: " . mysql_error();
  exit;
}
$num = mysql_num_rows($result);
$rows = mysql_fetch_array($result);
echo "<tr align=¥"center¥"><td colspan=¥"4¥">Status-Product 
Details</td></tr>";
}
for ($i=0; $i<$num; $i++){
echo "<tr align=¥"center¥"><td>PRODUCT 
NAME</td><td>".$rows['product_name']."</td><br><tr 
align=¥"center¥"><td>QUANTITY</td><td>".$rows['product_qty']."</td></tr><br><tr 
align=¥"center¥"><td>PRICE</td><td>".$rows['product_price 
yen']."</td></tr><br><tr 
align=¥"center¥"><td>CONDITION</td><td>".$rows['product_condition']."</td></tr><tr 
align=¥"center¥"><td colspan=¥"2¥">MORE DETAILS</td></tr><tr 
align=¥"center¥"><td 
colspan=¥"2¥">".$rows['product_desc']."</td></tr><tr 
align=¥"center¥"><td colspan=¥"2¥">DATA OUTPUT</td></tr><tr 
align=¥"center¥"><td  colspan=¥"2¥"><font 
type=¥"Shift_JIS¥">".$rows['product_data_output']."</font></td></tr>";
}
?>
</table>
<p>
<p>
<p>
<hr><center>email: status1@???????<p>
Telephone: ???????<p>
Fax: ????????
</center>
</body>
</html>


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links