Hello everyone,
I wanted to have  more precisions when to the utilization URL. I am going to
try to explain a little bit what I make in order that  you better to help
me.
Here is, my page1, I display a totality of data from an oracle basis I
proceed for that as follows:

$Connection = ocilogon("user","pw","oracle8i");

//Requête
$Query ="SELECT
num_dembill,code_recepteur,date_emission,to_char(heure_emission,'hh24:mi:ss'
),date_reception,
to_char(heure_reception,'hh24:mi:ss'),etat_dem FROM lrdembill
WHERE code_recepteur='ATS' and etat_dem='NL'";

//analyse la requête
$Statement = ociparse($Connection, $Query);

//execution de la requête
ociexecute($Statement);

//affichage du tableau
print"<TABLE BORDER=\"1\">";
print"<TR>";
print"<TH bgcolor=\"#CCCCCC\"><FONT color=\"#3300CC\">N°</FONT></TH>";
print"<TH bgcolor=\"#CCCCCC\"><FONT color=\"#3300CC\">Code
recep</FONT></TH>";
print"<TH bgcolor=\"#CCCCCC\"><FONT color=\"#3300CC\">Date
Emission</FONT></TH>";
print"<TH bgcolor=\"#CCCCCC\"><FONT color=\"#3300CC\">Heure
Emission</FONT></TH>";
print"<TH bgcolor=\"#CCCCCC\"><FONT color=\"#3300CC\">Date
Reception</FONT></TH>";
print"<TH bgcolor=\"#CCCCCC\"><FONT color=\"#3300CC\">Heure
Reception</FONT></TH>";
print"<TH bgcolor=\"#CCCCCC\"><FONT color=\"#3300CC\">Etat
Mess</FONT></TH>";
print"</TR>";

//remplissage du tableau
while(ocifetch($Statement))
{
  print("<TR>\n");
  
  //nombre de colonne
  $i = ocinumcols($Statement);
  print("<TD>");
    //Imprimer le num_dembill sous forme de lien et utiliser URL pour le
récupérer après
    if ($i=1)
    {
    $num=ociresult($Statement, 1);
    echo '<a href="forme7.php?num_dembill='.$num.'">'.$num.'</a>';

    //echo '<a
href="exemple.php?num_dembill='.$var['num_dembill'].'">.'</a>';

    //print (ociresult($Statement, 1));
    //print ("</a>");
    }
    print("</TD>\n");
    for($i=2; $i <= ocinumcols($Statement); $i++)
    {
    //imprimer la ligne comme "<TD>SMITH</TD>"
    print("<TD>");
    if(ocicolumnisnull($Statement, $i))
    {
      print("&nbsp");
    }
    else
    {
      print (ociresult($Statement, $i));
    }
    print("</TD>\n");
    }
  print("</TR>\n");
}


//liberer les ressources
ocifreestatement($Statement);

//arrêter la connection
ocilogoff($Connection);

and therefore I have in display of a table or  the num_dembill displays in
bond, I wanted to recuperate this same number to display the detail in the
page2 of the recording that wears  this same number but the problem is that
it does not transmit this same number to the page2 and I do not arrive truly
to divulge the problem it gives in the page2  the detail of the last record
of the selection, I proceed as follows:

$conn = ociLogon("user","pw","oracle8i");
$sql="select num_dembill,a.code_structure,a.code_emetteur,
a.code_recepteur,a.date_emission,
to_char(a.heure_emission,'hh24:mi:ss') heure_e,
a.date_reception,to_char(a.heure_reception,'hh24:mi:ss') heure_r,
b.nom_utilisateur,a.matric_agent,a.tel_bur_agent,a.VISA_DIRECT_STRU,
a.NOM_DIRECT_STRUC,a.VISA_RESP_RESER,a.NOM_RESP_RESER,
a.VISA_RESP_ACHA,a.NOM_RESP_ACHA,a.VISA_RESP_TRANS,a.NOM_RESP_TRANS,
a.VISA_RESP_REP,a.NOM_RESP_REP,a.DATE_OPTION,a.CHEMINEMENT,
a.etat_dem,c.nom_agnt,c.prenom_agnt,c.intitu_fonc,c.echeln,c.echell,
c.libell_stru from lrdembill a, lrutilmess b,lragents c
where a.code_recepteur='ATS'and (a.code_emetteur=b.code_utilisateur)
 and (a.matric_agent=c.matric_agnt)";
$sqlutil="select nom_utilisateur from lrutilmess where
code_utilisateur='ATS'";
$stmt = ociparse($conn,$sql);
$stmtutil= ociparse($conn,$sqlutil);

ociDefineByName($stmt,"NUM_DEMBILL",&$num_dem);
ociDefineByName($stmt,"CODE_RECEPTEUR",&$code_recepteur);
ociDefineByName($stmt,"CODE_EMETTEUR",&$code_emetteur);
ociDefineByName($stmt,"NOM_UTILISATEUR",&$emetteur);
ociDefineByName($stmt,"DATE_EMISSION",&$date_emission);
ociDefineByName($stmt,"HEURE_E",&$heure_emission);
ociDefineByName($stmt,"DATE_RECEPTION",&$date_reception);
ociDefineByName($stmt,"HEURE_R",&$heure_reception);
ociDefineByName($stmt,"MATRIC_AGENT",&$matric_agnt);
ociDefineByName($stmt,"NOM_AGNT",&$nom_agnt);
ociDefineByName($stmt,"PRENOM_AGNT",&$prenom_agnt);
ociDefineByName($stmt,"INTITU_FONC",&$fonct_agnt);
ociDefineByName($stmt,"ECHELN",&$echeln_agnt);
ociDefineByName($stmt,"ECHELL",&$echel_agnt);
ociDefineByName($stmt,"LIBELL_STRU",&$struc_agnt);
ociDefineByName($stmt,"TEL_BUR_AGENT",&$tel_agnt);
ociDefineByName($stmt,"CODE_STRUCTURE",&$code_structure);
ociDefineByName($stmt,"VISA_DIRECT_STRU",&$visa_direct_stru);
ociDefineByName($stmt,"NOM_DIRECT_STRUC",&$nom_direct_struc);
ociDefineByName($stmt,"VISA_RESP_RESER",&$visa_resp_reser);
ociDefineByName($stmt,"NOM_RESP_RESER",&$nom_resp_reser);
ociDefineByName($stmt,"VISA_RESP_ACHA",&$visa_resp_acha);
ociDefineByName($stmt,"NOM_RESP_ACHA",&$nom_resp_acha);
ociDefineByName($stmt,"VISA_RESP_TRANS",&$visa_resp_trans);
ociDefineByName($stmt,"NOM_RESP_TRANS",&$nom_resp_trans);
ociDefineByName($stmt,"VISA_RESP_REP",&$visa_resp_rep);
ociDefineByName($stmt,"NOM_RESP_REP",&$nom_resp_rep);
ociDefineByName($stmt,"CHEMINEMENT",&$cheminement);
ociDefineByName($stmt,"ETAT_DEM",&$etat_dem);
ociDefineByName($stmtutil,"NOM_UTILISATEUR",&$recepteur);
ociexecute($stmt);
ociexecute($stmtutil);



while (ociFetch($stmt))
{ }

     while (ociFetch($stmtutil))
     {
     }

   
print("<a name=Debut><h3></h3></a>");
print("<h1 align=center><FONT color=\"#FF0000\"><B>Demande d'Achat de Billet
pour Mission à l'Etranger</FONT></B></h1>");

//print("<FONT color=\"#3300CC\" align=center><B>Demande d'Achat de Billet
pour Mission à l'Etranger</FONT></B>");
print("<BR>");
print ("<A href=billet_lien.php>Revenir à  la page précédente</A>");
print("<BR>");
print("<BR>");
print("<table>");
print("<TR>");
print("<TH align=right><FONT color=\"#3300CC\"><B>"."N°:</FONT></B></TH>");
print("<TH><INPUT TYPE=\"text\" NAME=\"num\" SIZE=\"15\"  VALUE=\"$num_dem\"
readonly > </TH>");
print("</TR>");
print("<TR>");
print("<TD align=right><FONT color=\"#3300CC\"><B>"."Code Emetteur
:</FONT></B></TD>");
print("<TH><INPUT TYPE=\"text\" NAME=\"code_emet\" SIZE=\"15\"
VALUE=\"$code_emetteur\" readonly></TH>");
print("<TD align=right><FONT color=\"#3300CC\"><B>"."Nom Emetteur
:</FONT></B></TD>");
print("<TH><INPUT TYPE=\"text\" NAME=\"emet\" SIZE=\"15\"
VALUE=\"$emetteur\" readonly></TH> ");
print("</TR>");
print("<TR>");

ect.....

I believed that what it had to make in the page2 it is to make the SELECT by
report to the num_dembill of the page1.(SELECT.......WHERE
num_dembillpage2=num). 
Please if  you  can  help me I you  would be truly grateful, it is truly
urgent  thank you:-)


LYNDA HAOUHACH
Ingénieur Systèmes
SONATRACH LTH
Émail: [EMAIL PROTECTED]




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to