A Flash Developer Resource Site

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Is there anyway to send the information typed into an input text field to an external simple text file? I don't know CGI scripting.
    Thanks

  2. #2
    Senior Member
    Join Date
    Oct 2000
    Posts
    518

    resolved

    Flash alone can't do the job. You must know Perl, ASP, PHP or others.

  3. #3
    Moderator
    Join Date
    Feb 2001
    Posts
    13,042
    Hi,

    PHP example code - assuming your text box is simply called "text"
    Code:
    <?
    if($fp = @fopen("textfile.txt", "w"))
    {	$text = ereg_replace("\r", "\n", $text);
    	$text = ereg_replace("%", "%25", $text);
    	$text = ereg_replace("&", "%26", $text);
    	fputs($fp, "text=$text");
    	fclose($fp);
    	print "status=ok";
    }
    else
    	print "status=cannot+open+for+write";
    ?>
    The text replace things are there so that you can view the text file and also reopen it in flash

    Musicman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts




Click Here to Expand Forum to Full Width


HTML5 Development Center