saving to mysql as text

Discussion in 'MySQL' started by anurag.sharma, May 27, 2008.

  1. #1
    I wish to save the contends in a text box of a web page alone (other stuffs will be simply ignored) to be saved as a text file in Mysql , by assigning a name of the varible in the url to the text file generated.

    say , if the url is

    http://site.com/topic/xxxx/inbox

    where xxxx is the variable

    Please help
     
    anurag.sharma, May 27, 2008 IP
  2. allaboutgeo

    allaboutgeo Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    MySQL save the data in fields. You can save the data in a TEXT type column. Do you want to save the text box data in mysql or want to create a text file on hard disk?
     
    allaboutgeo, May 27, 2008 IP
  3. anurag.sharma

    anurag.sharma Guest

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I want to create a text file in the same directory (the same directory in which the page is located - assume that one has access) and save the contends in a text box alone in it.

    Advance thanks
     
    anurag.sharma, May 27, 2008 IP
  4. allaboutgeo

    allaboutgeo Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Use fwrite() to write the file and parse_url() to know where to save the file. To get text box date use $_GET or $_POST depending on your html form method.
     
    allaboutgeo, May 29, 2008 IP