Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > PHP Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 10-15-2006, 07:23 AM   #1 (permalink)
meghatronic
Junior Member
 
Join Date: Oct 2006
Posts: 2
Default Php output

I have a fairly simple mysql database that has a number of fields.

I have writtens some php to display the data from the database seperated by field. This is okay. (i.e. in a table).

What I'd like to do is have someway of dynamically choosing which fields to output (javascript?).

I.e. Say the database contains fields 1, 2, 3, 4 and 5.

I'd have check boxes under the headings 1-5 and the user can chose what fields to output. I.e. if 1 and 3 ticked only, then only the data from fields 1 and 3 would be outputted.

Second question, at the moment I am displaying the data echod in php to plain text, however I'd like to give the option to 'download' the data as a text file... any ideas?

Cheers guys
meghatronic is offline   Reply With Quote
Sponsored Links
Old 10-16-2006, 01:05 AM   #2 (permalink)
O~Snapple
Moderator Of The Year
 
O~Snapple's Avatar
 
Join Date: Jul 2006
Location: Cali Breeze
Posts: 716
Send a message via MSN to O~Snapple Send a message via Skype™ to O~Snapple
Default Re: Php output

ok this sounds like a fun project....

Well for the first part...

make the check boxes part of a form, and make the action query the database and have it say IF 1 is checked then echo 1 else die or something along those lines.

The second part i would do something similar give the user the option set the form to IF download then (Download Function).

I dont know the exact code off the top of my dome, but this should send you in the right direction.


~Snapple
__________________
The Real Truth
Epademik Emcee Esq. New Album The 3rd Finger is in Stores Now!
Snap Marketing Management and Consulting
O~Snapple is offline   Reply With Quote
Old 10-16-2006, 05:48 AM   #3 (permalink)
meghatronic
Junior Member
 
Join Date: Oct 2006
Posts: 2
Default Re: Php output

Presumuably I'd have to write the information to a temporary file before download, though?
meghatronic is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 04:40 AM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums