1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
function connect(){ $connection_string = 'DRIVER={SQL Server};SERVER=[server name];DATABASE=[database name]'; $user = 'xxx'; $pass = 'xxxxx'; $connection = odbc_connect( $connection_string, $user, $pass,SQL_CUR_USE_DRIVER ); return $connection; }