![]() |
| ||
| Newbie php question. how to create a mailing list? Hello, I am a newbie coder and I am trying to find a way to create a php mailing list. Ive tried looking around but have only succeeded in becoming more lost and confused. 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 a .txt file on my server. I will then copy the email addy's and import them into my emailing software. Some options I would also like is a redirect to a page thanking them for adding their email to my list. I would obviously make the page but if nayone knows how to redirect with in the php file that would be excellent. 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 for any and all help. |
| ||
| Re: Newbie php question. how to create a mailing list? [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] Here is some code i found, it seems to work but the redirect isn't working correctly. Does anyone know what is wrong? |
| ||
| Re: Newbie php question. how to create a mailing list? Here is a piece of a redirect from one of my pages: Quote:
The last part just gives them a closing message and the include part is a javascript that closes it out. I am assuming you know a bit about java if not let me know and I will post a footer script for you. Hope this helps. |
| All times are GMT -4. The time now is 6:44 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC