<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">Sub-page: 123123. Php
Convert the symbol letters you want to display into Chinese characters.
<?phpinclude ("DBDA.class.php"), $db = new Dbda (), $sql = "SELECT * from Info", $attr = $db->query ($sql); for ($i =0; $i & Lt;count ($attr), $i + +) {$attr [$i][2]= $attr [$i][2]? " Male ":" female "; $sqll =" SELECT name from Nation where code = ' {$attr [$i][3]} ' "; $de = $db->query ($SQLL); $attr [$i][3] = $de [0][ 0];} n001^ han |n002^ hui $str = ""; foreach ($attr as $v) {$str. =implode ("^", $v). "|";} echo $str; Echo substr ($str, 0,strlen ($STR)-1);
Sub-page: 123124.php
? PHP
include ("DBDA.class.php");
$db = new Dbda ();
$code = $_post["code"];
$sql = "SELECT * from info where code= ' {$code} '";
$attr = $db->query ($sql);
$attr [0][2]= $attr [0][2]? " Male ":" Female ";
$SQLL = "SELECT name from Nation where code = ' {$attr [0][3]} '";
$de = $db->query ($SQLL);
$attr [0][3] = $de [0][0];
$STR = "";
foreach ($attr as $v)
{
$str. = Implode ("^", $v). "|";
}
echo substr ($str, 0,strlen ($STR)-1);
Here is the result of the run
Use Ajax to view people information on data