Guest Posted February 23, 2006 Posted February 23, 2006 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?
kgt Posted February 23, 2006 Posted February 23, 2006 What's wrong with this? It's how I would do it. Contributions Discount Coupon Codes Donations
Guest Posted February 23, 2006 Posted February 23, 2006 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:
kgt Posted February 23, 2006 Posted February 23, 2006 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.