| | #1 |
| Check The Abstract. War Room Member Join Date: 2010
Posts: 435
Thanks: 9
Thanked 137 Times in 42 Posts
|
Hey I have a website perfectballhandling.com and I want the user to be able to press the get updates button enter their email and it saves to mail.php on my server. can you tell me what i'm doing wrong?
|
|
Chill.
| |
| |
| | #2 |
| HyperActive Warrior War Room Member Join Date: 2010
Posts: 220
Thanks: 1
Thanked 25 Times in 23 Posts
|
Hi, Its probably something to do with your mail.php file. Have you edited it to email the input to your email address? If you are not sure you could post the mail.php content here and someone might be able to give you a better idea as to what you've done wrong. Cheers Max |
| PornStarStamina is for sale! - Buy the book rights and website! or Just Download the Book For FREE! - Check it out! | |
| |
| | #3 |
| Check The Abstract. War Room Member Join Date: 2010
Posts: 435
Thanks: 9
Thanked 137 Times in 42 Posts
|
what i want the site to do is save the email address's imputed to the mail.php file. so all the emails will be in the file
|
|
Chill.
| |
| |
| | #4 |
| Active Warrior Join Date: 2010
Posts: 54
Thanks: 6
Thanked 1 Time in 1 Post
|
Do you have a database like MySql? Or do you just want the emails emailed to you?
|
| |
| | #5 |
| Check The Abstract. War Room Member Join Date: 2010
Posts: 435
Thanks: 9
Thanked 137 Times in 42 Posts
|
i just want the emails saved to mail.php. but if it's easier then yeah i'll have them emailed to me
|
|
Chill.
| |
| |
| | #6 |
| Advanced Warrior War Room Member Join Date: 2010 Location: New Delhi, IN
Posts: 978
Thanks: 93
Thanked 340 Times in 59 Posts
|
Create a 'email.txt' file and change it's permission to writable. Place this script in mail.php ----------------------------------------------------------------------- <?php $fp = fopen('email.txt','r+'); if(!$fp) { echo "Create the file first."; }else{ $present = FALSE; while (!feof($fp)) { $email = fgets($fp); if ($_POST['email'] == trim($email)){ $present = TRUE; } } if (!$present){ fwrite($fp, $_POST['email']."\n"); echo "Email :".$email.' added.'; } fclose($fp); } ?> ----------------------------------------------------------------------- The only assumption in this script is that it expects 'email' in a post request.Make sure it receives one or edit the script to your needs. The emails are stored in the 'email.txt' file you just created. Let me know if you have a problem. |
| |
| | #7 |
| Check The Abstract. War Room Member Join Date: 2010
Posts: 435
Thanks: 9
Thanked 137 Times in 42 Posts
|
oh my god dude it worked! thanks !!!
|
|
Chill.
| |
| |
| | #8 |
| Advanced Warrior War Room Member Join Date: 2010 Location: New Delhi, IN
Posts: 978
Thanks: 93
Thanked 340 Times in 59 Posts
|
You are welcome mate. |
| | |
| |
|
| Bookmarks |
| Tags |
| programming, quick |
| Thread Tools | Search this Thread |
| |