On Sat, Apr 28, 2001 at 07:12:15PM +0100, Robert Morrissey wrote:
>  I have a form on one page with a text box called 'emailtext'. This gets
> passed to a php script that gets info from a database (such as $name,
> $email, etc) and mails selected email addresses; my problem is this:
> 
> Say, the form passes $emailtext as "Hello $name, how're you?", and this is
> passed to mail() in the php form, rather than emailing "Hello Bob, how're
> you?" it prints "$name" literally.
> 
> Seeing as $name isn't pulled from the database till the php script is it
> possible to get it to print the value? or do I have to pull $name from the
> database  in the original form? (which'll is going to be a lot more
> complicated).
> 
> Does this make sense?

No, not really.  What is the value of $name when the form passes $emailtext?
That is the value that will be in $name.  If it is actually printing
$name and not an empty string, then the '$' must be getting escaped
somewhere along the line, or you are using ' instead of " around the
variable.  

http://www.php.net/manual/en/function.echo.php
-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
I'll say it again for the logic impaired.
             -- Larry Wall

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to