Jump to content

[SOLVED] What's wrong with this line?


eMonk

Recommended Posts

'Subject' => 'Bio Submission by " . $name . "'

 

sorry i'm still new to php & still need to learn the difference between single & double quotes & how to use them.

 

the problem here is, i'm trying to include the post values from $name into the subject line but it's showing up as "Bio Submission by $name" in the subject line when it's suppose to fetch the info from $name

 

$name = $_POST['name'];

 

thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/133752-solved-whats-wrong-with-this-line/
Share on other sites

if u were to print the whole line

echo "Subject=> Bio Submission by ".$name ;
echo "Subject=> Bio Submission by {$name}" ;


if u need to assign  $ value to subject variable
echo $Subject= "Bio Submission by {$name}" ;
echo $Subject= "Bio Submission by ".$name;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.