Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Write orders to mssql-database


Guest

Recommended Posts

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?

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...