#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Olympia
    Posts
    19
    Rep Power
    0
    My client wants a catalog of sorts that looks something like this: http://genwhy.wednet.edu/projects/ar...mode=exemplary . However, my client wants the information to come via a text file that will be uploaded. My question is how do you get the information from the text file uploaded into a database as variables?

    For example the text file may read:
    Model # Year
    2 99
    How do I get the Model # in the text file to become a variable in php when uploaded?
  2. #2
  3. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    in your script

    open the file

    store the data in an array

    parse through each line of the array, separating the fields into variables and do something with them

    if you're not sure what functions you'll need to use, you'll probably use

    fopen(), each(), explode(), among others

    if you have have tried to do this, are still having problems, and ask very nicely, i might go into further detail :-)


    good luck

    [This message has been edited by RyanP (edited August 21, 2000).]
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Olympia
    Posts
    19
    Rep Power
    0
    But what if each time the text file is different? Not necessarily always the same.

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by lushenejj:
    My client wants a catalog of sorts that looks something like this: http://genwhy.wednet.edu/projects/ar...mode=exemplary . However, my client wants the information to come via a text file that will be uploaded. My question is how do you get the information from the text file uploaded into a database as variables?

    For example the text file may read:
    Model # Year
    2 99
    How do I get the Model # in the text file to become a variable in php when uploaded?
    [/quote]

  6. #4
  7. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    do you mean a different number of fields in each record?

    i'm sure that can be taken care of with a smart enough script

Similar Threads

  1. help with tables and wordwrapping
    By junkedBrian613 in forum PHP Development
    Replies: 2
    Last Post: February 15th, 2004, 05:42 PM
  2. extracting text from pdf files online
    By igiveadamn in forum Perl Programming
    Replies: 2
    Last Post: February 13th, 2004, 04:09 PM
  3. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  4. float question
    By yeah-yeah in forum HTML Programming
    Replies: 10
    Last Post: January 15th, 2004, 03:59 PM
  5. Javascript scrollbar - stuck on last bit
    By NayMyoSan in forum JavaScript Development
    Replies: 0
    Last Post: January 3rd, 2004, 12:05 PM

IMN logo majestic logo threadwatch logo seochat tools logo