PHP Mail Help

Posted by Danny159, 02-08-2011, 10:19 AM
Hey, I have the following script, and I am trying to make it so when the user puts {$name} it will come up with the clients name but it doesnt seem to work... it just comes up with $name.... does anyone know why or can help me... The bd connection is in another file thats includes so that works... Dan

Posted by sanjayi, 02-09-2011, 03:30 AM
Hello all, I am new here, I just want Discussion regading Programming.Please someone help me.

Posted by PHPNerdz, 02-10-2011, 01:33 AM
Hey Okay I am just learning PHP, so I may be wrong. I see in your html form you have $global_company_name; in one of the form elements but I do not see that in the php script any were Also where is the {$name} in your php script as I do not see it. I see $fromname = $_POST['fromname']; but that's about it Are you getting any errors, Notice, etc. please let me know. Last edited by PHPNerdz; 02-10-2011 at 01:38 AM. Reason: forgot to add some thing

Posted by Danny159, 02-10-2011, 06:55 AM
Ahhh it gets $global_company_name from the config.php file thats included at the top of the page. (You cant see that bit on the code I posted) The user would put {$e_name} if they wanted to see the clients name in the textarea called 'message' I am getting no errors but when I put {$e_name} in the body text of the email the email sends to me but it has $e_name not the client's name... Dan

Posted by PHPNerdz, 02-10-2011, 07:06 AM
Yes But how can you use a php variable in a form. I think I am not understanding your script, what is it that you want it to do in full.

Posted by coderiser, 02-10-2011, 01:00 PM
it is just because you are not passing your variables correctly

Posted by Danny159, 02-10-2011, 05:50 PM
I have fixed it now just by adding the following code... eval("\$message = \"$message\";"); =) Thanks for your help guys Dan

Var dette svaret til hjelp?

 Print

Les også disse

pear modules

Posted by Calibaba, 09-09-2007, 09:48 AMTrying to install Cerberus Help Desk and it gives this...

Clovertown 5335 vs Nehalem 5504

Posted by Dr_Michael, 04-19-2009, 02:00 PMCan you tell me which CPU architecture is better?...

Barracuda Load Balancer

Posted by Dualism, 03-27-2008, 05:46 PMHello, I am just interested to know, if it is possible to...

Adult Hosting

Posted by Nell, 09-03-2002, 02:07 AMI search resellers hosting plan for adult sites. The main...

Wordpress Avatar based on username

Posted by mfwl, 02-10-2011, 05:43 AMI am trying to add a wordpress avatar based on the username,...