www.webdeveloper.com
Results 1 to 7 of 7

Thread: Trying to input data into a website and allow sorting by users...

  1. #1
    Join Date
    Feb 2006
    Posts
    12

    Trying to input data into a website and allow sorting by users...

    I'm wanting to input a data base of input, onto my website and then have my users able to Sort through this data. Basically an Excel File on my website...is this possible, and what would I need or what would I need to do to make this happen?


    Thanks Chunky

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    If you save the Excel file as a CSV file, then it's pretty easy to read/parse the data with PHP's fgetcsv() function.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Feb 2006
    Posts
    12
    I appreciate the help, but I have no clue what you just said.

  4. #4
    Join Date
    Oct 2005
    Posts
    843
    file => save as => CSV (comma deliberated)

    then use php to access the file and such.
    Welsh

  5. #5
    Join Date
    Feb 2006
    Posts
    12
    I understand the save as part, just haven't messed with Php before....any tutorials on this out there, or any advice from you guys would be awesome

  6. #6
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    Beginning PHP: http://www.zend.com/php/beginners/index.php

    From the link I gave in my prior reply:
    Example 1. Read and print the entire contents of a CSV file
    PHP Code:
    <?php
    $row 
    1;
    $handle fopen("test.csv""r");
    while ((
    $data fgetcsv($handle1000",")) !== FALSE) {
       
    $num count($data);
       echo 
    "<p> $num fields in line $row: <br /></p>\n";
       
    $row++;
       for (
    $c=0$c $num$c++) {
           echo 
    $data[$c] . "<br />\n";
       }
    }
    fclose($handle);
    ?>
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  7. #7
    Join Date
    Feb 2006
    Posts
    12
    Thank you very much...I'll look into it, and hit you up with any problems I have if you don't mind.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles