|
|
|
|
![]() ![]() |
Apr 15 2007, 02:26 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 292 Joined: 27-January 07 From: Winter is cold here. Member No.: 37,984 ![]() |
Hello everyone! I am in need of some code a for a signature generator I am making. I am using BuffaloHELP's code for the php file, now I am trying to improve that code by making a form in a html file that will have the user say what is on the sig! But now, I need help getting the form data that is posted by the user to get into that sig! There is a file, sig.txt, where that tells the php file what text will go on the sig. But how can I make the form data in the html file go into the text file so it will go onto the sig? You might want to read BuffaloHELP's code. You can find it in probably simalar topics or scroll down some in the php forum. Thanks All!
PS. BuffaloHELP's Topic is called dynamic image/ sig generator. This post has been edited by Imtay22: Apr 15 2007, 02:27 PM |
|
|
|
May 6 2007, 11:53 PM
Post
#2
|
|
|
Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 975 Joined: 25-September 05 From: The dungeon deep below the foundation of trap17 Member No.: 12,251 |
You need to use the fopen and fwrite functions. That is if I understand you right.
So have the html form submit to a php page that gets all of the vars that the form sent to you and use something like this to modify the text file: CODE $file=fopen("name of text file.txt", 'w'); fwrite($file,"Data to put into the text file"); fclose($file); For the mode (the second paramater of the fopen function), here is a list of what strings do different stuff. (taken from php.net) QUOTE r' Open for reading only; place the file pointer at the beginning of the file. 'r+' Open for reading and writing; place the file pointer at the beginning of the file. 'w' Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. 'w+' Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. 'a' Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it. 'a+' Open for reading and writing; place the file pointer at the end of the file. If the file does not exist, attempt to create it. 'x' Create and open for writing only; place the file pointer at the beginning of the file. If the file already exists, the fopen() call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call. This option is supported in PHP 4.3.2 and later, and only works for local files. 'x+' Create and open for reading and writing; place the file pointer at the beginning of the file. If the file already exists, the fopen() call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call. This option is supported in PHP 4.3.2 and later, and only works for local files. I hope this helps! This post has been edited by alex7h3pr0gr4m3r: May 6 2007, 11:54 PM |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 25th July 2008 - 08:44 PM |