FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Sending vars by email + text

 


alalex
how can I send an email including text + variables.
I tried doing this:
Code:

<?php
mail('aluralma@hotmail.com','New registration for ($name)','($name) has just registered email: ($email) username: ($username) password: ($password)');
 ?>

But it sends an email like this:
($name) has just registered, email: ($email) username: ($username) password: ($password)

I want to make that variables!!!
kv
use double quotes instead of single quotes.

Code:

mail("aluralma@hotmail.com","New registration for ($name)","($name) has just registered email: ($email) username: ($username) password: ($password)");


It should work. variable resolution inside string happens when the string is within double quotes.
alalex
Ok, thanks a lot!!
alalex
Ok, thanks a lot!!
alalex
Ok, thanks a lot!!
alalex
Ok, thanks a lot!!
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.