Hi,
I tried to connect to an Oracle Database via ODBC but I got the following message:
Method Not Allowed
The requested method POST is not allowed for the URL /PHP_ODBC/odbc.php.
Oracle HTTP Server Powered by Apache/1.3.19 Server at ora01t.de.net.intra Port 80
I just want to do a small test with three fields on a HTML form, a PHP script:
<?PHP
$dsn="ORASCN";
$user="altindag";
$passwort="bnp"; $verbindung=odbc_connect($dsn,$user,$passwort);
if ($verbindung)
echo "Verbindung o.k.";
//verbindung mit ODBC-Datenquelle
//verhindern dass die Werte leer übergeben werden:
$sql="INSERT INTO CLIENTS VALUES ('$cli_id','$firstname','$lastname');";
//$sql="commit;";
$ergebnis=odbc_exec ($verbindung,$sql);
if ($ergebnis)
echo "<BR><BR> Deine Daten werden jetzt in eine Datenbank mitaufgenommen";
else
echo "nicht übergeben";
odbc_close($verbindung);
?>
and an Oracle Database (table Clients).
I want to insert and select data from this table.
To select data I have the following script:
<html>
<head>
<title></title>
<meta name="author" content="Administrator">
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#FF0000" alink="#FF0000" vlink="#FF0000">
<?php
$dsn="ORASCN";
$user="altindag";
$passwort="bnp"; $verbindung=odbc_connect($dsn,$user,$passwort);
//verbindung mit ODBC-Datenquelle
//wenn vorname angekreuzt
if ($vn)
{
$sql="SELECT firstname FROM clients";
}
else
$sql="SELECT lastname FROM clients";
echo "nicht übergeben"
$ergebnis=odbc_exec ($verbindung,$sql);
odbc_result_all($ergebnis);
odbc_close($verbindung);
echo $ergebnis;
?>
</body>
</html>
I will be so happy if someone can help me.
Have a nice day
Selman