Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
|
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
|
|
|
Author |
Message |
21/08/2003 02:44:02
|
dbztoolkit
Beginner
Joined: 21/08/2003 02:37:14
Messages: 6
Offline
|
I need this to right the form content to the txt file if you know how help me please ive been trying for a week
this is the form in message.php
<?php
<form name="form1" method="post" action="messageboard.php" >
<input type="name" name="name" value="name"> </form>
?>
this is the messageboard.php
<?php
$filename = 'mail.txt';
$somecontent = ("test this is what is posted to mail.txt");
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
// In our example we're opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, 'a')) {
print "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (!fwrite($handle, $new)) {
print "Cannot write to file ($filename)";
exit;
}
print "Success, wrote ($new) to file ($filename)";
fclose($handle);
} else {
print "The file $filename is not writable";
}
?>
|
whats up need help |
|
21/08/2003 16:18:40
|
Anonymous
|
try this, doesn't work let me know
this is the messageboard.php
|
|
|
|
|
|
Based on the open source JForum
|