Hi.
I am trying to understand how a piece of code works, in order that I can use it again in the future:
$email = mysql_result($result, 0, "email");
$from = "From: [email]info@MySite.co.uk[/email] \r\n";
$mesg = "The password you registered with us is: $password \r\n"
."For extra security, please change it next time you log in. \r\n";
if (mail($email, "MySite login information", $mesg, $from))
It is actually the first line I need some explanation on - the rest seems self explanatory (I just included it so you could see why the first line was needed).
Why are 3 parameters passed to mysql_result? Obviously, the code is called after successful completeion of a mysql query (obtaining the email address of a user from the database) - so my question is this:
what does the 0, "email" part mean and do?
Thanks.