Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1927 | Replies: 1
•
•
Join Date: Mar 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hello, I am a newbie coder and I am trying to create a php mailing list.
I would like the users to enter their email address into the text box
and click submit and have the email addresses seperated by ;'s and
imported into my list.txt file.
Here is the code I found that I am currently using.
[php]<?php
$email = $_POST['email'];
$data = "list.txt";
$open = fopen($data, "a");
fwrite($open, $email . "\n" );
fclose($open);
echo '<form style="visibility:hidden" action="http://www.stukface.com" method="post" name="theForm" id="theForm"><input type="hidden" name="NextPage" value=""> <input name="email" type="text" value="' . $_POST['email'] . '"><input type="submit" name="Submit22" value="submit" alt="submit"></form>';
echo '<SCRIPT LANGUAGE="JavaScript"> javascript:document.forms[0].submit() </script>'
?>[/php]
The redirect isn't working correctly. Does anyone know what is wrong?
I am also interested in knowing if there could be a way to validate the email so that it is in proper email form ie 123@acb.com.
Thank you very much.
I would like the users to enter their email address into the text box
and click submit and have the email addresses seperated by ;'s and
imported into my list.txt file.
Here is the code I found that I am currently using.
[php]<?php
$email = $_POST['email'];
$data = "list.txt";
$open = fopen($data, "a");
fwrite($open, $email . "\n" );
fclose($open);
echo '<form style="visibility:hidden" action="http://www.stukface.com" method="post" name="theForm" id="theForm"><input type="hidden" name="NextPage" value=""> <input name="email" type="text" value="' . $_POST['email'] . '"><input type="submit" name="Submit22" value="submit" alt="submit"></form>';
echo '<SCRIPT LANGUAGE="JavaScript"> javascript:document.forms[0].submit() </script>'
?>[/php]
The redirect isn't working correctly. Does anyone know what is wrong?
I am also interested in knowing if there could be a way to validate the email so that it is in proper email form ie 123@acb.com.
Thank you very much.
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Threaded Mode