Hello everyone! Im new to the language Php and i need your help. Please help me on how to generate a text document or an *.xls file using Php. Data to be generated are taken from the database. Thanks and hoping for your response.
dudegio 0 Junior Poster in Training
Recommended Answers
Jump to PostYou can find it in the php manual if you do a little search :)
Here is that code adjusted to what you need:<?php /// here is your database connection /// than the query $result = mysql_query ("select field_1, field_2, field_3 from table") or die (mysql_error()); …
Jump to PostYou're welcome! :)
Jump to PostJust a Tip for you, as you're new to PHP.
Once you've written to the txt file and want to get all the info from it again.
You can use the file_get_contents() function to store the file's contents into a string.
Example:$str = file_get_contents("file.txt"); echo $str; …
All 9 Replies
johny_d 23 Junior Poster in Training
dudegio 0 Junior Poster in Training
johny_d 23 Junior Poster in Training
dr4g 25 Junior Poster
w_3rabi 8 Junior Poster
kye 0 Newbie Poster
hunkychop 3 Junior Poster in Training
kye 0 Newbie Poster
candlelight 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.