1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
<?session_start();?>
<?php
define('NUMDIGITS', 100);
$ora_conn = ocilogon("zzzzz","zzz","zzzzzz");
if(isset($_POST['typeeqt'])) $typeeqt=$_POST['typeeqt']; else $typeeqt="";
if(isset($_POST['nomeqt'])) $nomeqt=$_POST['nomeqt']; else $nomeqt="";
$s=ociparse($ora_conn,"insert into NOME (codee,CODETEQT,nomeqt,ttypeeqt ) VALUES ('mcenv' || seq.nextval,(select CODETEQT from TYPEEQUIT where TTYPEEQT =:bind2),:bind1,(select ttypeeqt from typeequit where ttypeeqt=:bind2))returning codee into :mybv");
ocibindbyname($s, ':bind1', $nomeqt,-1 );
ocibindbyname($s, ':bind2', $typeeqt,-1);
OCIBindByName($s, ':MYBV', $mybv, NUMDIGITS);
OCIExecute($s,OCI_DEFAULT);
$vv=$mybv;
//echo "Bind variable is $vv <br>\n";
$_SESSION['var']=$vv;
echo 'La variable "variable" existe et vaut: ' . $_SESSION['var'];
?>
<?
OCICommit($ora_conn );
?>
<html>
<p><a href="addnomeq.php">ajouter un nom equipement</a></p>
<p><a href="currval.php">ajouter pieces correspendant a l'equipement</a></p>
</html> |
Partager