Hi!
I´m new at this so I hope some can help me. My problem are that the conditional statements want work as i will. You can see below what i have entered. I want it to write the statemant only if there condition not are agreed. Now it write all statements at tha same time. I hope some understan what I mean.
Thanks
Runar
<?
$result = mysql_query("SELECT * FROM $table WHERE user='$user' and email='$email'and pwd='$pwd' ");
if (mysql_num_rows($result)) {
while($row=mysql_fetch_array($result)) {
$email = $row['email'];
mysql_query("UPDATE $table SET pwd='$pwd2' WHERE user='$user' and email='$email'");
echo"Lösenordet är skickat!";
mail("$email", "Ditt lösenord till elevkalendarium", "Hej $user!
Ditt nya lösenord är: $pwd2
MvH
Runar", "From: $email_webmaster");
}
} else {
echo"Couldn’t find the username!";
}
/// This below have i entered//
if (email != "$email") {
echo"Couldn’t find the e-mail adressen!";
} if (pwd != "$pwd") {
echo"Wrong password!";
}
?>