php 5.1.4 under windows xp
I try to have php ask for two questions and post data to mssql
it's work a part, i ask the two question where the 2nd one is done i strat to print print only the quetions until i use ctrl-c
is some one could tell me what i did wrong
-*-*-*-*-*- the bug -*-*-*-*
Entrez le departement :
Entrez le numero de commade :
Entrez le departement :
Entrez le numero de commade :
Entrez le departement :
Entrez le numero de commade :
---*-*-* the script -*-*-*-
<?php
$blnRunning = true;
$rsConnect = odbc_connect("GPS_TESTCOMPAGNIE", "ship", "ship");
do {
echo "Entrez le numero de commade :\n ";
$rsInput = fopen("php://stdin", "r");
$strNoCommand = trim(fread($rsInput, 12));
fclose ($rsInput);
echo "Entrez le departement :\n";
$rsInput1 = fopen("php://stdin", "r");
$strNoDepartment = trim(fread($rsInput1, 4));
fclose ($rsInput1);
$rsUpdate = odbc_exec ($rsConnect, "insert into hsl_suividecmd (sop_order, datein, dep, isactive)
values ( '{$rsInput}', getdate() , '1234' , '1')");
} while($blnRunning);
?>
I try to have php ask for two questions and post data to mssql
it's work a part, i ask the two question where the 2nd one is done i strat to print print only the quetions until i use ctrl-c
is some one could tell me what i did wrong
-*-*-*-*-*- the bug -*-*-*-*
Entrez le departement :
Entrez le numero de commade :
Entrez le departement :
Entrez le numero de commade :
Entrez le departement :
Entrez le numero de commade :
---*-*-* the script -*-*-*-
<?php
$blnRunning = true;
$rsConnect = odbc_connect("GPS_TESTCOMPAGNIE", "ship", "ship");
do {
echo "Entrez le numero de commade :\n ";
$rsInput = fopen("php://stdin", "r");
$strNoCommand = trim(fread($rsInput, 12));
fclose ($rsInput);
echo "Entrez le departement :\n";
$rsInput1 = fopen("php://stdin", "r");
$strNoDepartment = trim(fread($rsInput1, 4));
fclose ($rsInput1);
$rsUpdate = odbc_exec ($rsConnect, "insert into hsl_suividecmd (sop_order, datein, dep, isactive)
values ( '{$rsInput}', getdate() , '1234' , '1')");
} while($blnRunning);
?>