English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I would like to save data from variables (holding data from text boxes etc.). I would like to save the data to files. I am using PHP and if I have to I could send it somehow to some other scripting language I will but I am trying to find what would work best. I unfortunatly am not seeming to find much for saving to file through PHP, (Creating a file etc). Any ideas, links or scripts?

Thanks kindly,

Brian

2007-02-15 06:11:10 · 3 answers · asked by Brian D 1 in Computers & Internet Programming & Design

3 answers

go to http://www.php.net/docs.php - they have php chm help files that you can download. Open the CHM help file you downloaded and search for "file" and select file functions. They give you sample code for opening and writing to files.

2007-02-15 06:17:51 · answer #1 · answered by Anonymous · 0 0

First make sure the server you are uploading to supports PHP. Then read this guide link below and look at the suggestions at the bottom for tools for converting to PHP.

http://us2.php.net/tut.php

2007-02-15 14:20:19 · answer #2 · answered by Rick G 2 · 0 0

Let's suppose you have set up a server running apache/iis and PHP.
Now you have a file like form.php which contains this form in addition to other data.






When you click this submit button, the form will be submitted to submit.php which looks something like this
$strName = $_POST['strName'];
$fp=fopen("data.txt","a");
fwrite($fp,$strName);
fclose($fp);
?>

2007-02-19 07:04:57 · answer #3 · answered by Atif Majid 3 · 0 0

fedest.com, questions and answers