variables within variables

From: Date: Sat, 28 Apr 2001 18:12:15 +0000
Subject: variables within variables
Groups: php.general 
Request: Send a blank email to php-general+get-50767@lists.php.net to get a copy of this message
Hi, 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? Thanks for any help, Robert Morrissey

« previous php.general (#50767) next »