Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Need PHP Tip

Master Summoner
Joined
Aug 22, 2005
Messages
547
Reaction score
0
ok so this is what i need:

PHP:
$query = "SELECT login, password FROM accounts WHERE email='".$_POST['login_mail_r']."'";
$res=mysql_fetch_assoc(mysql_query($query));
if(!$res)
         die("Account not found!");

$msg="Hi,\n here is your required login data:\n\n
Username: ".$res['login']."\nPassword: ".$res['password']."";

mail($_POST['login_mail_r'],"Login data retrive", $msg);

OK THIS RIGHT HERE HAS TO SEND THE DATA TO U EMAIL

PHP:
echo 'Data successfully sended!<br><b>DATA:</b><br>'; (if is successfuly send it)

now insted of sending it to an email i want that the data to be printed on the page WHAT DO I NEED TO WRITE HERE?
<-------
PHP:
echo '<br><a href="index.php">Back to index</a>';
}
?>
 
Custom Title Activated
Loyal Member
Joined
Nov 28, 2004
Messages
2,236
Reaction score
0
for not sending mail remove
PHP:
mail($_POST['login_mail_r'],"Login data retrive", $msg);
for printing anything:
PHP:
echo "You have successfully registered to the server!";

if you need to repeat the message which is/isn't sent to the client by mail:
PHP:
echo $msg;
 
Master Summoner
Joined
Aug 22, 2005
Messages
547
Reaction score
0
echo $msg; i guess i'm stupid .... i did have some php problems when i tryed that .... but THX LEXX
 
Custom Title Activated
Loyal Member
Joined
Nov 28, 2004
Messages
2,236
Reaction score
0
just report full error messages; and read some php basics ;)
 
Master Summoner
Joined
Aug 22, 2005
Messages
547
Reaction score
0
nope i didn't got an error just i was to lazy to make it send a mail so i decided to print the msg on the page is stupid i know but for now it works :)
 
Back
Top