answersLogoWhite

0

How do you connect odbc to php?

Updated: 8/20/2019
User Avatar

Wiki User

12y ago

Best Answer

Syntax: odbc_connect(string datasource, string username, string password);

<?php

$host = "localhost"; // The host name varies

$user = "root"; // Username also varies in db

$pwd = ""; // Password varies in db

$connect = odbc_connect($host,$user,$pwd);

if(!$connect)

{

die("Could not establish connection to odbc database");

}

?>

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you connect odbc to php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you connect to an Oracle database using PHP?

Is there an ODBC driver available for your Oracle database? If so, the ODBC functions may be the way to go.


How do you access Microsoft Access databases with PHP?

ODBC / System DSN


What is ODBC in tally?

In tally ODBC is used to connect to other programs and exchange data dynamically


Is Microsoft Access compatible with PHP?

Yes. PHP supports an API called ODBC that allows it to interact with Microsoft Access databases.


How do you connect oracle database in javascript?

By using ODBC


What drivers are needed to setup a database with ODBC?

Alongside dedicated ODBC drivers, a JDCB driver is usually required. This enables a bridge to the ODBC driver, enabling the database to connect to its target.


How do you connect to mysql using vb6?

Install the MyODBC database connector.Set up an new ODBC connection to your mysql database in Windows. (This will vary based on your version of Windows)You can use the ADODB extension in VB to connect to your ODBC connection.


How do you use an Access database with PHP?

Something I never thought about doing before, but this is possible.First, you must make sure that your PHP installation has ODBC capabilities. If it does not. see http://php.net/odbcYou must use PHP's ODBC commands. I have never worked with these, you I cannot help you any further. I would recommend a mySQL database. It's simpler and more widely used in the field of web design. I could help you with that instead.


How can you connect php to msql?

Use mysql_connect() php function to connect to the mysql.Please refer related link for more details.


True or false an arteriole connects the capillary?

odbc applications allow you to connect to sql server


Can tally be connected to other programs?

Yes you can connect other programs to tally using odbc &amp; customization


How do you connect sqlserver with HTML?

using php