Ouch, another question - reading a set of html and giving an option

Discussion in 'PHP' started by wvccboy, Jun 13, 2007.

  1. #1
    Sorry guys got another question which will be useful for future reference as well.

    I'm creating a backend now for my script, and it needs to read a set of html (such as <p>Data: Data here<br>Cost: 0.00) This is one set of data, and there are many sets of this type of set listed one by one in a PHP page.

    The admin panel needs to read one set of this code, and then next to it be an option to delete the entire set from the PHP page.

    Anyone understand what I mean :eek:

    Thanks! :D
     
    wvccboy, Jun 13, 2007 IP
  2. speda1

    speda1 Well-Known Member

    Messages:
    374
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Why don't you write/delete the data to a db table instead of writing and deleting to pages?
     
    speda1, Jun 13, 2007 IP
  3. wvccboy

    wvccboy Notable Member

    Messages:
    2,632
    Likes Received:
    81
    Best Answers:
    1
    Trophy Points:
    250
    #3
    I was planning on that, but PHP seemed more efficient.

    I guess if I'm going to go in a different direction I will need to know how to write the data to a .txt file rather than a PHP file and show it that way. Does anyone know how to do that?

    Thanks
     
    wvccboy, Jun 13, 2007 IP
  4. speda1

    speda1 Well-Known Member

    Messages:
    374
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #4
    You can use fwrite() to do that.
     
    speda1, Jun 13, 2007 IP
  5. wvccboy

    wvccboy Notable Member

    Messages:
    2,632
    Likes Received:
    81
    Best Answers:
    1
    Trophy Points:
    250
    #5
    Yes, but I have no idea how to use fwrite()... which is why I have been using php all along.

    Any tuts or examples would be greatly appreciated.

    Thanks!
     
    wvccboy, Jun 13, 2007 IP
  6. speda1

    speda1 Well-Known Member

    Messages:
    374
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #6
    speda1, Jun 13, 2007 IP