Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Write orders to mssql-database


Guest

Recommended Posts

Posted

Hi!

I'm trying to write all orders to an mssql-database by an odbc connection.

I've got it working if I open and close the connection inside checkout_process.php with:

 

 $conn=odbc_connect('something','something','password');
if (!$conn)
 {exit("Connection Failed: " . $conn);
}

the queries....

odbc_close($conn);

 

I know this can't be safe so the question is: How do I do I open/close a mssql connection inside osCommerce in a safe way?

Posted

I don't know, it feels unsafe to have $conn=odbc_connect('something','something','password'); in the order_process.php-file. But maby it isn't :rolleyes:

Posted
I don't know, it feels unsafe to have $conn=odbc_connect('something','something','password'); in the order_process.php-file. But maby it isn't :rolleyes:

 

If you're worried about the username and password being visible, then you can move them to includes/configure.php or something. Either way, though, they're still visible to anyone who gets access to your files, not to someone just browsing your site.

 

If you really want to be secure, you can put the username and password for mysql and mssql in an includes file outside your webroot. You'd do this by adding an

 

include( '../../dbinfo.php' );

 

line where the database information is in the configure file.

Contributions

 

Discount Coupon Codes

Donations

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...