So this is the part of my index.html file that has the input box:
And this is my sent.php file:Code:<form action="http://www.THEURL.com/sent.php" id="mailinglist" method="post"> <input type="text" name="mail" size="40"> </form>
I had tried modding the sent.php file from an FLP but I know I'm doing something wrong >.< I'm pretty sure it has to do with theCode:<?php $email = $_POST['mailinglist']; $date = date("F j, Y"); $all = "Email: " . $email . "\n"; $file = "list.txt"; $handle = fopen($file, "a+"); //mail("MYEMAILADDRESS@gmail.com",$subject,$body); fwrite($handle, $all); fclose($handle); header ("Location: http://www.THEURL.com"); header("Content-type: text/plain"); print_r(htmlspecialchars(print_r($_POST, 1))); ?>
line.Code:$email = $_POST['mailinglist'];
Any help would be greatly appreciated!
Thanks,
~Flareboy323
Results 1 to 4 of 4
Thread: [Help?] 'Lil PHP Question
- 23 Jun. 2011 04:09pm #1
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 0.00
[Help?] 'Lil PHP Question
- 23 Jun. 2011 04:39pm #2
- 23 Jun. 2011 04:50pm #3
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 0.00
Thanks a ton Matt, I'll try it out
EDIT: It works, thanks a ton!
/threadLast edited by 323; 23 Jun. 2011 at 04:58pm.
- 23 Jun. 2011 05:05pm #4