PHP Self pages
am 12.08.2008 21:15:59 von kitfox69
I have three PHP pages that post data to each consecutive page.
I would like the second page, the one with a pull down menu of customer ids, to spawn itself onto the next page so that the person using it would not have to click back to choose the next customer id.
Currently the first page captures and posts a date to the second page and the second page generates the pull down with values and has a get data submit button to forward to the third page where all the data is displayed.
How can I merge the second and third page together so that once a value is selected in the pull down and then the get data button is clicked it just populates the data right next to the pull down?
Script for page 2 and 3 below:
PAGE2:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Today's Customers
content="text/html; charset=iso-8859-1" />
$conn = odbc_connect("HOMES", "", "");
$billdate = $_POST[ 'billdate' ];
$query = ("SELECT DISTINCT sls_his_cust_id FROM sls_his where sls_his_prchdat_alt = $billdate");
$result = odbc_exec($conn, $query);
echo "";
?>
PAGE3:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Customer Information
content="text/html; charset=iso-8859-1" />
$conn = odbc_connect("HOMES", "", "");
$sls_his_cust_id = $_POST[ 'sls_his_cust_id' ];
$query1 = ("SELECT DISTINCT sls_his_d2_nam as 'Customer Name',
cust_phone_no as 'Phone Number 1',
cust_phone_no_2 as 'Phone Number 2',
cust_phone_no_3 as 'Phone Number 3'
FROM sls_his , cust
where CUST_ID = SLS_HIS_CUST_ID
and sls_his_cust_id = '$sls_his_cust_id'");
$query2 = ("SELECT DISTINCT sls_his_pft_ctr as 'Profit Center',
UPPER(slm_nam) as 'Sales Person'
FROM sls_his, slm
where sls_his_slm_1 = slm
and sls_his_cust_id = '$sls_his_cust_id'");
$query3 = ("SELECT sls_his_item_id as 'Item ID',
sum(sls_his_qty_sld) as 'Quantity Sold',
sls_his_prchdat_alt as 'Billed Date'
FROM sls_his
where sls_his_cust_id = '$sls_his_cust_id'
Group by sls_his_item_id, sls_his_prchdat_alt
Order by sls_his_prchdat_alt");
$result1 = odbc_exec($conn, $query1);
$result2 = odbc_exec($conn, $query2);
$result3 = odbc_exec($conn, $query3);
odbc_result_all($result1)
?>
odbc_result_all($result2)
?>
odbc_result_all($result3)
?>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP Self pages
am 12.08.2008 21:18:46 von Micah Gersten
Try this:
http://xajaxproject.org/
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
kitfox69@comcast.net wrote:
> I have three PHP pages that post data to each consecutive page.
>
> I would like the second page, the one with a pull down menu of customer ids, to spawn itself onto the next page so that the person using it would not have to click back to choose the next customer id.
>
> Currently the first page captures and posts a date to the second page and the second page generates the pull down with values and has a get data submit button to forward to the third page where all the data is displayed.
>
> How can I merge the second and third page together so that once a value is selected in the pull down and then the get data button is clicked it just populates the data right next to the pull down?
>
> Script for page 2 and 3 below:
>
> PAGE2:
>
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>
>
> Today's Customers
>
> content="text/html; charset=iso-8859-1" />
>
>
>
> $conn = odbc_connect("HOMES", "", "");
> $billdate = $_POST[ 'billdate' ];
> $query = ("SELECT DISTINCT sls_his_cust_id FROM sls_his where sls_his_prchdat_alt = $billdate");
> $result = odbc_exec($conn, $query);
>
> echo "";
> ?>
>
>
>
> PAGE3:
>
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>
>
> Customer Information
>
> content="text/html; charset=iso-8859-1" />
>
>
>
> $conn = odbc_connect("HOMES", "", "");
> $sls_his_cust_id = $_POST[ 'sls_his_cust_id' ];
> $query1 = ("SELECT DISTINCT sls_his_d2_nam as 'Customer Name',
> cust_phone_no as 'Phone Number 1',
> cust_phone_no_2 as 'Phone Number 2',
> cust_phone_no_3 as 'Phone Number 3'
> FROM sls_his , cust
> where CUST_ID = SLS_HIS_CUST_ID
> and sls_his_cust_id = '$sls_his_cust_id'");
> $query2 = ("SELECT DISTINCT sls_his_pft_ctr as 'Profit Center',
> UPPER(slm_nam) as 'Sales Person'
> FROM sls_his, slm
> where sls_his_slm_1 = slm
> and sls_his_cust_id = '$sls_his_cust_id'");
> $query3 = ("SELECT sls_his_item_id as 'Item ID',
> sum(sls_his_qty_sld) as 'Quantity Sold',
> sls_his_prchdat_alt as 'Billed Date'
> FROM sls_his
> where sls_his_cust_id = '$sls_his_cust_id'
> Group by sls_his_item_id, sls_his_prchdat_alt
> Order by sls_his_prchdat_alt");
> $result1 = odbc_exec($conn, $query1);
> $result2 = odbc_exec($conn, $query2);
> $result3 = odbc_exec($conn, $query3);
> odbc_result_all($result1)
>
> ?>
>
>
> odbc_result_all($result2)
>
> ?>
>
>
> odbc_result_all($result3)
>
> ?>
>
>
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php