RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1927 | Replies: 1
Join Date: Mar 2007
Posts: 3
Reputation: Slavis81 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Slavis81 Slavis81 is offline Offline
Newbie Poster

Help Need help with php mailing list/redirect

  #1  
Mar 31st, 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]<?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.
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:32 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC