Domanda

I am trying to create a PHP page that will select all data from my MSSQL table products. Once all data is selected I would like a .txt file to be created that displays all the table data in it. When the .txt file is created I would like the file to be attached to an email that gets sent to me. I prefer the .txt file to not be saved onto my website's server as that would create a lot of .txt files and take up too much space.

If anyone has any idea on how to do this it would be greatly appreciated. Thank you for any help!

È stato utile?

Soluzione

Divide and conquer.

Connecting to a MSSQL database in PHP
http://webcheatsheet.com/php/connect_mssql_database.php http://us2.php.net/manual/en/book.mssql.php

PHP file IO functions
http://www.php.net/manual/en/ref.filesystem.php

PHP send email
http://www.php.net/manual/en/function.mail.php

Once you've learned how to do each of these small tasks, you can integrate them into the larger system you've described.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top