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