944,056 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2553
  • PHP RSS
Dec 7th, 2004
0

File Handling Help NEEDED

Expand Post »
I am making (or trying to make) a mailing list form for my web site. It is supposed to write the email addresses to the file but it isnt working any help would be GREATLY helpful THANKS

1}

<html>
<body>
<form action="write1.php" method="POST">
What is your E-MAIL ADRESS <input type="text" name="mail" />
<input type="submit" />
</form>

</body>
</html>


2}
<html>
<body>
<?php
<script language="php">
$filename = 'test.txt';
$fp = fopen($filename, "a");
$write = fputs($fp, $_POST["mail"]);
fclose($fp);
</script>
<strong>GOOD</strong>
</body>
</html>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
badger.home is offline Offline
2 posts
since Dec 2004
Dec 8th, 2004
0

Re: File Handling Help NEEDED

Quote ...
$write = fputs($fp, $_POST["mail"]);
I guess that's the problem, try:

PHP Syntax (Toggle Plain Text)
  1. fputs($fp, $_POST["mail"];


Quote ...
<script language="php"> </script>
I don't think you need this, but where's the ?> ?




Michael
Reputation Points: 11
Solved Threads: 8
Posting Whiz in Training
pcschrottie is offline Offline
204 posts
since Dec 2004
Dec 12th, 2004
0

Re: File Handling Help NEEDED

THANK YOU SO MUCH sorry about the wait but my server was down
Reputation Points: 10
Solved Threads: 0
Newbie Poster
badger.home is offline Offline
2 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: "hey STUPID finish the form" function?
Next Thread in PHP Forum Timeline: Counting votes in a poll





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC