Bonjour,

j'ai un problème de convertir mon code php sous mysql au oracle, la méthode $_post ne marchera pas!!
le code est le suivent :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html>
 <body >    
	<div> 
	 <form>
    <table>
     <tr><td> <hr /> </td></tr>       <!-- tarcer une ligne  -->
     <tr><td> <hr /> </td></tr>
        <tr>
        <td>&nbsp;&nbsp;&nbsp;Identifiant  <input type="text" name="username" value="" /></td>
        </tr>
        <tr>
        <td>&nbsp;&nbsp;&nbsp;Mot de passe     <input type="password" name="password" value="" /></td>
        </tr>
        <tr><td> <hr /> </td></tr>
		<tr><td> <hr /> </td></tr>
        <tr>
        <td>&nbsp;&nbsp;&nbsp;  <input type="submit" name="Connect" value="<<---  Connexion   --->>" />  </td>
        </tr>
 
    </table>
     </form>
	 </div>
	<?php  
	    $conn= oci_pconnect('system','SYSDBA','localhost/XE');
	if (!$conn){
		$e = oci_error();
		trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
		}
				Else {
		      echo "connection successful";
			  echo '</br>';
			  }
 
if (isset($_POST['username']) || isset($_POST['password'])) {
 
$sql0 = 'select count(*) as NOMBRE0 from PSD.OTUSERBEA 
               where IDENTIFIANT=:username and MOTPASSE=:password ;';
 
$ordre0 = oci_parse ($conn, $sql0);
 
			 oci_bind_by_name($sql0, ":username", $_POST['username']);
             oci_bind_by_name($sql0, ":password", $_POST['password']);
oci_execute ($ordre0);
$enrg=oci_fetch_object($ordre0);
echo $enrg->NOMBRE .'</br>'; 
// libere les ressources
oci_free_statement($ordre0);
 
}
 
   ?>
 
   	   </body>
  </html>
je vous remercie d'avance