Slavis81 Posted April 1, 2007 Share Posted April 1, 2007 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 $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>' ?> 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 [email protected]. Thank you very much. Link to comment https://forums.phpfreaks.com/topic/45096-help-with-php-mailinglistredirect/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.