ODBC for php connection
guys, sorri noobie in oravle databse here :pslalu guna mysql je, tiba2 opis guna oracle..wahaha
how do i create a connecting script in php for oracle? i usualy use this for mysq
<?php
$host = "localhost";//connect localhost mySQl
$user = "root";//the user
$password = "hehe";//password for table
$connection = mysql_connect($host, $user, $password) or die ("Cannot connect to the MySQL server ". mysql_error()); //step 1: connect to the MySQL server
mysql_select_db("hehe") or die ("Cannot select database " . mysql_error()); //step 2: Select a database
?>
any contoh example for me to use in php so tat can connect to Oracle Server tak? i dont use oracle as well (I'm usually work with either mssql or mysql), but you might want to look at php.net
http://my2.php.net/manual/en/ref.oci8.php thkx dude, shall look at it, infact, kalo dah dapat jawapan, aku post sini, can use for future reference :)
aah..orang lain tarak tau ka? <?php
$conn=odbc_connect('database','host','pwd');
if (!$conn)
{exit("Database Connection Failed: " . $conn);}
?>
that is the code needed :P as simple as ABCD.wahaha! only the first line of code is needed, the 2nd n 3rd is to check if connection is established
hope this helps ppl sounds good to me
Pages:
[1]