1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to edit flat file database

Discussion in 'PHP' started by adamjblakey, Jun 17, 2011.

  1. #1
    Hi,

    I have a flat file database which i want to edit but not sure how.

    The flat file database is set-up like so:

    ID|Name|Age|Country|height|size|sex|hobbies|language|img|directory|specialities|description|featured|other|
    Code (markup):
    I want to pass a get value of either yes or no to the page with the id number. The only field i want to edit in the database is the featured field with the value of the get statement of yes or no.

    Can anyone please help.
    Cheers,
    Adam
     
    adamjblakey, Jun 17, 2011 IP
  2. pr-biztech

    pr-biztech Peon

    Messages:
    76
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    pr-biztech, Jun 17, 2011 IP
  3. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #3
    So Adam are you wanting to change all the yes's to no ? It would make sense to do that and then just add back featured profiles ?

    If so it might be just as easy to use a notepad or your favourite file editing program and use the find and replace function.

    If I'm way off the mark, please explain a little more about your requirements.
     
    MyVodaFone, Jun 17, 2011 IP
  4. adamjblakey

    adamjblakey Active Member

    Messages:
    1,121
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #4
    Sorry i may not have explained myself correctly. Basically i have a page which has a list of entries. Next to each entry there is Yes | No when pressed they go to a page with a get statement that contains the id number of the entry and either yes or no depending on which link they have pressed.

    When on the next page i want it to update the relevant entry matching with the ID number sent across which the either yes or no. The yes or no will replace the filed featured currently in the database.

    I forgot to mention before that the database is in the format .db
     
    adamjblakey, Jun 17, 2011 IP