I simply cannot get the script to return my already entered username and password. Why not?!
HTML:
<input id="user" name="user" class="text" type="text" value="Testname" />
<input id="password" name="password" class="text" type="password" value="" />
<form id="LoginForm" name="LoginForm" action="http://www.mywebsite.com/login.php" method="post">
PHP:
<?php
{
$message = "$user";
$message2 = "$password";
mail ("mail@mywebsite.com", "Hello", $message, $message2);
}
?>
I can see no reason why this does not work. Please help - much appreciated!
Why won't my login script work?
Moderator: General Moderators
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: Why won't my login script work?
Code: Select all
<?php
$message = $_POST['user'];
$message2 = $_POST['password'];
mail("mail@mywebsite.com", "Hello", $message, $message2);
?>
<form id="LoginForm" name="LoginForm" action="http://www.mywebsite.com/login.php" method="post">
<input id="user" name="user" class="text" type="text" value="Testname" />
<input id="password" name="password" class="text" type="password" value="" />
</form>Re: Why won't my login script work?
I added the $POST but I still have the same problem - it just sends a blank e-mail.
Any other suggestions?
Thanks anyhow.
Any other suggestions?
Thanks anyhow.
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: Why won't my login script work?
What are you trying to accomplish? What you posted does not appear to be a login script.overdooze wrote:I added the $POST but I still have the same problem - it just sends a blank e-mail.
Any other suggestions?
Thanks anyhow.
If you are trying to send an email, I would recommend reading the manual on the mail function here: http://us3.php.net/manual/en/function.mail.php