File Handling Help NEEDED

Reply

Join Date: Dec 2004
Posts: 2
Reputation: badger.home is an unknown quantity at this point 
Solved Threads: 0
badger.home badger.home is offline Offline
Newbie Poster

File Handling Help NEEDED

 
0
  #1
Dec 7th, 2004
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>
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 204
Reputation: pcschrottie is an unknown quantity at this point 
Solved Threads: 8
pcschrottie's Avatar
pcschrottie pcschrottie is offline Offline
Posting Whiz in Training

Re: File Handling Help NEEDED

 
0
  #2
Dec 8th, 2004
$write = fputs($fp, $_POST["mail"]);
I guess that's the problem, try:

  1. fputs($fp, $_POST["mail"];


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




Michael
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2
Reputation: badger.home is an unknown quantity at this point 
Solved Threads: 0
badger.home badger.home is offline Offline
Newbie Poster

Re: File Handling Help NEEDED

 
0
  #3
Dec 12th, 2004
THANK YOU SO MUCH sorry about the wait but my server was down
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 2334 | Replies: 2
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC