PHP via Windows. Open pass-through value problem and Chinese character matching problem

Source: Internet
Author: User
A page A tracking information button to open another page B through Windows.open, you need to pass the page A on the same line of conditions to query the results displayed on the B, the value is through a post or get can be removed from the a page value


Reply to discussion (solution)

A page Order Enquiry
if ($_post[' 1shijian1 ')
{
Echo ' <title>Data query</title>';
echo "";

if ($_post[' 1shijian1 ']<>null)
$shijian 1= "and COPTC. tc003>= ". $_post[' 1shijian1 ');
Else
$shijian 1 = "";

if ($_post[' 1shijian2 ']<>null)
$shijian 2= "and COPTC. tc003<= ". $_post[' 1shijian2 ');
Else
$shijian 2 = "";


Require_once (' i_code/connect.php ');

$query = "Select Leixing,null as xifen,null as sewen,null as DDGM,BZTDB, null as Daba,sum (TD008) as Td008,sum (TA015) ta015,su M (Rkzs) rkzs,sum (D310) d310,sum (D305) d305,sum (D304) d304,sum (D3023) d3023,sum (TH008) th008,sum (TJ007) TJ007
From Chaxun
Left JOIN ddtjmx on ma003=leixing
Left joins COPTC on TC001=DDTJMX. TD001 and TC002=DDTJMX. TD002
where xifen= ' ". $shijian 1. $shijian 2." GROUP by Leixing,bztdb
UNION ALL
Select Leixing,xifen,null as sewen,null as ddgm,bztdb,null as Daba,sum (TD008) as Td008,sum (TA015) ta015,sum (Rkzs) Rkzs, SUM (D310) d310,sum (D305) d305,sum (D304) d304,sum (D3023) d3023,sum (TH008) th008,sum (TJ007) TJ007
From Chaxun
Left JOIN ddtjmx on ma003=leixing and Xifen=xifen
Left joins COPTC on TC001=DDTJMX. TD001 and TC002=DDTJMX. TD002
where xifen= ' 5050 '. $shijian 1. $shijian 2. " GROUP by Leixing,xifen,bztdb
UNION ALL
Select Leixing,xifen,sewen,ddgm,bztdb,daba,sum (TD008) as Td008,sum (TA015) ta015,sum (Rkzs) rkzs,sum (D310) d310,sum ( D305) d305,sum (D304) d304,sum (D3023) d3023,sum (TH008) th008,sum (TJ007) TJ007
From Chaxun
Left joins DDTJMX on Ma003=leixing and Xifen=xifen and SEWEN=DDTJMX. UDF10 and DDGM=DDGM and Daba=xinghao
Left joins COPTC on TC001=DDTJMX. TD001 and TC002=DDTJMX. TD002
Where xifen<> ' and xifen<> ' 5050 '. $shijian 1. $shijian 2. " GROUP by Leixing,xifen,sewen,ddgm,bztdb,daba ORDER by Xifen,sewen,daba ";


$result =mssql_query ($query);
$row _num=mssql_num_rows ($result);

if ($row _num>0)
{
echo "





































"; echo " ; ; ; ; ; ; ; ; ; ; ; The ; ; "; while ($row =mssql_fetch_assoc ($result)){Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo \ n ";}Echo
product categoryProduct SegmentationColor temperatureorder sizestandard ratio of single investmentTarget Shootingorder quantityexpected yieldtotal number of storagestandard warehousingquantity of goods soldnumber of pin backtracking Information
". $row [' leixing ']."". $row [' Xifen ']."". $row [' Sewen ']."". $row [' DDGM ']."". $row [' Bztdb ']."". $row [' Daba ']."". Number_format ($row [' TD008 '],0)."". Number_format ($row [' TA015 '],0)."". Number_format ($row [' Rkzs '],0)."". Number_format ($row [' D310 '],0)."". Number_format ($row [' TH008 '],0)."". Number_format ($row [' TJ007 '],0)."Tracking information
";
Echo ';

}

Mssql_close ($conn);

}
?>

b page
if ($_get[' N1 ')
{
Echo ' <title>Tracking information</title>';
Require_once (' i_code/connect.php ');

$querydd = "Select DDGM1. Td001,ddgm1. Td002,ddgm1. Td003,coptd. Td004,coptd. Td005,coptd. Td016,ma003,ddgm1. Udf10,xinghao,xifen,ddgm,ddgm1. Td008,coptd. Udf03,mocta. Ta001,mocta. Ta002,ddzs. Ta015,mocta. Ta011,mocta. Udf06,tdb,
Case when DDGM1. Td008=0 then 0 when ddgm1.td008<>0 then convert (decimal (18,3), Ddzs. Ta015/ddgm1. TD008) END as Sjb,ddzs. rkzs,d310,
Case when DDGM1. Td008=0 then 0 when ddgm1.td008<>0 then convert (decimal (18,3), d310/ddgm1. TD008) END as dddcl,d305,d304,d3023,th008,tj007
From DDGM1
Left joins Ddzs on Ddzs. Td001=ddgm1. TD001 and Ddzs. Td002=ddgm1. TD002 and Ddzs. Td003=ddgm1. TD003
Left joins COPTC on COPTC. Tc001=ddgm1. TD001 and COPTC. Tc002=ddgm1. TD002
Left joins Mocta on Ta026=ddzs. TD001 and Ta027=ddzs. TD002 and Ta028=ddzs. TD003
Left joins COPTD on COPTD. Td001=ddgm1. TD001 and COPTD. Td002=ddgm1. TD002 and COPTD. Td003=ddgm1. TD003
where Xifen like ". $_get[' N1 ')." and Xinghao like ". $_get[' N2 ';


$RESULTDD =mssql_query ($querydd);
$row _numdd=mssql_num_rows ($RESULTDD);
if ($row _numdd>0)
{
echo "















































"; echo " number; ; ; ; ; ; ; ; ; The ; The ; ; ; ; ; ; ; The ; "; while ($rowdd =mssql_fetch_assoc ($RESULTDD)){Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo "; Echo \ n ";}Echo
order sliptypeColor temperaturemodel numbersubdivisionorder sizeorder quantityexpected yieldstandard ratio of single investmentactual ratio of single-votetotal number of storagequalified goods storageorder Fulfillment Ratenon-standard warehousingfraction storagewaste storagequantity of goods soldnumber of pin back
". $rowdd [' TD001 ']." -". $rowdd [' TD002 ']." -". $rowdd [' TD003 ']."". $rowdd [' MA003 ']."". $rowdd [' UDF10 ']."". $rowdd [' Xinghao ']."". $rowdd [' Xifen ']."". $rowdd [' DDGM ']."". Number_format ($rowdd [' TD008 '],0)."". Number_format ($rowdd [' TA015 '],0)."". $rowdd [' TDB ']."". $rowdd [' SJB ']."". Number_format ($rowdd [' Rkzs '],0)."". Number_format ($rowdd [' D310 '],0)."". $rowdd [' DDDCL ']."". Number_format ($rowdd [' D305 '],0)."". Number_format ($rowdd [' D304 '],0)."". Number_format ($rowdd [' D3023 '],0)."". Number_format ($rowdd [' TH008 '],0)."". Number_format ($rowdd [' TJ007 '],0)."
";
}

Mssql_close ($conn);
}
?>

Need is from the page a leixing xifen Sewen daba conditions to the B page as a query condition, how to do it

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.