PHP

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: PHP
Master
Member # 5977
Profile Homepage #0
I'm trying to make a script which will automatically send me an email upon the registration of a member. the email will include all information Entered at a form (which i made myself too). now comes the thing I don't understand: Even if you fill out the whole form, it keep saying that you didn't retype the password. The script is below:

<html>
<body>

<?php

// First define necessary veriables:

$sendto="fs2004clan@hotmail.com"; // This is the email address to where all emails will be sent
$from=$_POST["from"];
$subject=$_POST["subject"];
$name=$_POST["realname"];
$username=$_POST["username"];
$password=$_POST["password"];
$password2=$_POST["password2"];

// Now get all information from the form, be sure that fields are filled in!

if (isset($from)==FALSE) { // check email address
echo "<html>";
echo "<head>";
echo "</head>";
echo "<body>";
echo "An error occurred while processing your application form. You didn't enter your Email address. Please use your web browser's 'back' button to return, as to check if you filled out all fields required.";
echo "</body>";
echo "</html>";
}
else

if (isset($name)==FALSE) { // Check name
echo "<html>";
echo "<head>";
echo "</head>";
echo "<body>";
echo "An error occurred while processing your application form. You didn't enter your name (first and last). Please use your web browser's 'back' button to return, as to check if you filled out all fields required.";
echo "</body>";
echo "</html>";
}
else

if (isset($username)==FALSE) { // Check username
echo "<html>";
echo "<head>";
echo "</head>";
echo "<body>";
echo "An error occurred while processing your application form. You didn't enter a username you would like to use. Please use your web browser's 'back' button to return, as to check if you filled out all fields required.";
echo "</body>";
echo "</html>";
}
else

if (isset($password)==FALSE) { // Check password
echo "<html>";
echo "<head>";
echo "</head>";
echo "<body>";
echo "An error occurred while processing your application form. You didn't enter a password. Please use your web browser's 'back' button to return, as to check if you filled out all fields required.";
echo "</body>";
echo "</html>";
}
else

if (isset($password2)==FALSE) { // Check retype password
echo "<html>";
echo "<head>";
echo "</head>";
echo "<body>";
echo "An error occurred while processing your application form. You didn't retype your password. Please use your web browser's 'back' button to return, as to check if you filled out all fields required.";
echo "</body>";
echo "</html>";
}

// Now check whether the passwords match.

else

if ($_POST["password"]!=$_POST["password2"]) {
echo "<html>";
echo "<head>";
echo "</head>";
echo "<body>";
echo "An error occurred while processing your application form. The password you entered at the 'Retype password' field didn't match the password you typed at the 'Password' field. Please try again. use the browser's back button to go back.";
echo "</body>";
echo "</html>";
}
else {

// If this is all correct, continue sending the email.

$from=$_REQUEST["from"];
$subject=$_REQUEST["subject"];
$name=$_REQUEST["realname"];
$username=$_REQUEST["username"];
$password=$_REQUEST["password"];
$headers="From: $from";

// Set sex to male or female

if ($_POST["sex"]=="male") {
$gender="He";
}
else $gender="She";

// Compose the message for fs2004clan@hotmail.com

$message= "This is a message from $from. $realname wants to become/n".
"a member. $gender wants the following/n".
"username and password:/n".
"$username/n".
"$password/n".
"/n".
"A message was sent to you and the applicant. Before/n".
"activating new account, make sure you receive/n".
"email confirmation!";

mail($sendto,$subject,$message,$headers);

// Now send email to applicant

include ("counter.dat");

$subject="Registration at the FS2004 Clan";
$messageap= "Thank you for registering at the FS2004 Clan!/n".
"Please confirm that you got this email by clicking/n".
"the link below./n".
"http//:thralni.ermarian.net/fs2004clan/confirm.html/ /n".
"On that page, enter the following code: $code/n".
"You will receive an email containing your username and password /n".
"after your confirmation of this email, and the account/n".
"has been activated manually./n".
"/n".
"The leaders of the FS2004 clan";

mail($from,$subject,$messageap);

include ("counter.php"); // Run counter.php to make a different code

// display the thank you message

echo "<html>";
echo "<head>";
echo "Registration succesfull!";
echo "</head>";
echo "<body>";
echo "<p><h2>Thank you for registering at the FS2004 Clan</h2></p>";
echo "<br> <br>";
echo "<h3>You will receive a confirmation email shortly, containing a confirmation code. Use it to confirm your email adress.</h3>";
echo "<br> <br>";
echo "<a href='http://thralni.ermarian.net/fs2004clan/'>Click here to return to the home page</a>";
}

?>

</body>
</html>
I was hoping that one of you may know what's wrong. If you want to give it a better look, I can send you the script together with the form it comes with.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Agent
Member # 6581
Profile Homepage #1
I can't help, but out of curiousity, why?

--------------------
Download Geneforge 4: Rebellion

You have 6 posts. Nobody cares what you think. - Thuryl

Wikipedia may be your friend, but UBB is not. - Dikiyoba
Posts: 1310 | Registered: Tuesday, December 20 2005 08:00
Law Bringer
Member # 2984
Profile Homepage #2
Presente. :)

--

There are several things that could be done better (non-essential), and I see a few errors that might cause it... but I guess it'd be best if I could take a look at the form as well. Just email it (or tell me where you put it on the webspace ;) ).

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Master
Member # 5977
Profile Homepage #3
quote:
Originally written by MagmaDragoon:

I can't help, but out of curiousity, why?
What do you mean "why"? Why what?

Aran: I sent you the script. Thanks.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Agent
Member # 6581
Profile Homepage #4
Why you are making that script. That's my question.

quote:
Originally written by Drow:

Presente. :)

:eek:

--------------------
Download Geneforge 4: Rebellion

You have 6 posts. Nobody cares what you think. - Thuryl

Wikipedia may be your friend, but UBB is not. - Dikiyoba
Posts: 1310 | Registered: Tuesday, December 20 2005 08:00
Master
Member # 5977
Profile Homepage #5
I'm making that script, ecause I'm building a new website. The website will be the home for the Flight Simulator 2004 Clan which i'm setting up together with a friend. in order to get members, i made a form for them to fill out. now I have to make it work with this script.

First i tried using custom scripts by others, but as they all returned errors and it all just didn't function proparly, I made my own. Anyway, when making my own scripts, I know exactly what it is that I'm writing there. When I use other's scripts, i usually don't. Its the same with BoA. I prefer making my own scripts, even though a certian script already exists.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Agent
Member # 6581
Profile Homepage #6
IMAGE(http://digilander.libero.it/arosati76/thx4info.gif)

--------------------
Download Geneforge 4: Rebellion

You have 6 posts. Nobody cares what you think. - Thuryl

Wikipedia may be your friend, but UBB is not. - Dikiyoba
Posts: 1310 | Registered: Tuesday, December 20 2005 08:00