To get the value from text file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mandarchalke29
    New Member
    • Oct 2007
    • 7

    To get the value from text file

    Can anyone please tell me how do set the javascript variable value to a simple text file and to retrieve the same value using PHP.

    Means to set the value in text file using javascript and to get the value from that text file using PHP.
  • mandarchalke29
    New Member
    • Oct 2007
    • 7

    #2
    To get the value from text file

    Can anyone please tell me how do i set the javascript variable value to a simple text file and to retrieve the same value using PHP.

    Means to set the value in text file using javascript and to get the value from that text file using PHP.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      As far as i know - with the least amount if hassle - you can only really do this with PHP.

      W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
      Last edited by pbmods; Dec 23 '07, 10:05 PM. Reason: Fixed link.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by mandarchalke29
        Means to set the value in text file using javascript and to get the value from that text file using PHP.
        You can't access the file system using JavaScript. What you can do is use Ajax to make a request to the PHP script to write to the text file instead.

        You may just be better off using PHP for both setting and getting the value, but it depends on your requirements.

        Comment

        • pbmods
          Recognized Expert Expert
          • Apr 2007
          • 5821

          #5
          Heya, Mandar.

          Is the text file on the User's computer or on the server?

          Comment

          Working...